UNPKG

chess-legal-moves

Version:

Analyses a given chess game position in Fen notation to return legal moves and provides the next game position after a given move

30 lines (29 loc) 845 B
import BitBoard from '../BitBoard/BitBoard'; export default class Board { boardString: string; whites: BitBoard; blacks: BitBoard; pawns: BitBoard; rooks: BitBoard; knights: BitBoard; bishops: BitBoard; kings: BitBoard; queens: BitBoard; constructor(boardString: string); feedBoard(boardString: string): void; get allPieces(): BitBoard; get empty(): BitBoard; get whitePawns(): BitBoard; get whiteRooks(): BitBoard; get whiteKnights(): BitBoard; get whiteBishops(): BitBoard; get whiteQueens(): BitBoard; get whiteKing(): BitBoard; get quietDestinations(): BitBoard; get blackPawns(): BitBoard; get blackRooks(): BitBoard; get blackKnights(): BitBoard; get blackBishops(): BitBoard; get blackQueens(): BitBoard; get blackKing(): BitBoard; }