INNER CODE UNIT · TypeScript
moves
josefjadrny/js-chess-engine · src/index.ts:410
export function moves(config: BoardConfig | string): MovesMap {
const game = new Game(config);
return game.moves();
}
/**
* Get board status
*
* @param config - Board configuration or FEN string
* @returns Board configuration with current status
*/
export function status(config: BoardConfig | string): BoardConfig {
const game = new Game(config);
return game.exportJson();
}
/**
* Get FEN string for a position