@patricoda/chess-engine
v2.2.1
Published
Node module to create chess game sessions for two human players.
Downloads
8
Readme
Patricoda chess-engine
Node module to create chess game sessions for two human players.
Developed to be used in conjunction with the Patricoda chess-client and Patricoda chess-server.
Installation
Use the package manager npm to install:
npm install @patricoda/chess-engine
Usage
import { Game } from "@patricoda/chess-engine";
//create new game instance
const game = new Game();
//start new game
game.init();
//make a move
game.move({from: 'a1', to:'b1');
//get current game state, including game status, board state, legal moves, and player turn
game.getGameState();
//promote
game.promote('QUEEN');
//forfeit
game.forfeit();