Skip to content

waymondrang/chesster.js

Repository files navigation

chesster.js

NPM Version

A TypeScript chess library focused on performance and accuracy.

Features

  • Fast move generation using bit-manipulation
  • Full chess rules (castling, en passant, promotion)
  • Fivefold repetition stalemate draw
  • Move history and undo
  • FEN string import
  • Check, checkmate, and stalemate detection

Installation

npm install chesster.js

Usage

import { Chesster } from "chesster.js";

// Create a new game
const game = new Chesster();

// Get all legal moves
const moves = game.moves();

// Make a move
game.move(moves[0]);

// Undo a move
game.undo();

// Check if game is over
if (game.isGameOver()) {
    console.log("gg");
}

Planned features

  • FEN string export
  • MORE PERFORMANCE!

License

ISC

About

A TypeScript chess library focused on performance and accuracy.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •