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

17 lines (16 loc) 675 B
import { IGameState, IScan } from '../types'; import { knightsMoves } from './moves/knightsMoves'; import { pawnsMoves } from './moves/pawnsMoves'; import { rooksMoves } from './moves/rooksMoves'; import { bishopsMoves } from './moves/bishopsMoves'; import { queensMoves } from './moves/queensMoves'; import { kingMoves } from './moves/kingMoves'; export declare const generate: { knightsMoves: typeof knightsMoves; pawnsMoves: typeof pawnsMoves; rooksMoves: typeof rooksMoves; bishopsMoves: typeof bishopsMoves; queensMoves: typeof queensMoves; kingMoves: typeof kingMoves; }; export declare function createNewGameScan(gameState: IGameState): IScan;