chess-engine-class
v1.0.3
Published
Chess engine that will handle the board creation, the move of pieces and the checkmate
Readme
This project is a typescript class chess engine.
To use the module :
npm install chess-engine-classor
yarn add chess-engine-classThe engine will be installed in your project.
Utilisation :
import { Chess } from "chess-engine-class/src/chess";
let game = new Chess();Index of cells are mades as this :
A B C D E F G H
7
6
5
4
3
2
1
0Move piece like this :
let pos = { x: 3, y: 7 };
let piece = game.getBoardCell(pos).currentPiece;
game.movePiece(piece, targetPos);