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

9 lines (8 loc) 573 B
import { IColor } from '../types'; export declare function isPawn(piece: string): boolean; export declare function isCapture(piece: string, destination: string): boolean; export declare function updateFenBoard(fenBoard: string): string; export declare function incrementFullMoveClock(fullMoveClock: number): number; export declare function incrementHalfMoveClock(halfMoveClock: number): number; export declare function toggleHasToPlay(hasToPlay: IColor): IColor; export declare function updateAvailableCastlings(availableCastlings: string, castlingLetter: string): string;