@patricoda/chess-engine

2.2.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @patricoda/chess-engine

Weekly Downloads

1

Version

2.2.1

License

ISC

Unpacked Size

130 kB

Total Files

6

Last publish

Collaborators

  • patricoda