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

5 lines (4 loc) 255 B
import { IColor, ILegalMoves } from '../../types'; import Board from '../Board/Board'; export declare function kingMoves(board: Board, hasToPlay: IColor): ILegalMoves; export declare function getKingAndColor(hasToPlay: IColor): 'whiteKing' | 'blackKing';