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

11 lines (10 loc) 424 B
import { IGameState } from '../types'; /** * Creates new game state from the current state and the added move * @param move - a string representing a move in long UCI notation * @param state - an IGameState object representing the current state of the game * @returns the new game state after the move is added * * @internal */ export default function createNewGameState(move: string, state: IGameState): IGameState;