INNER CODE UNIT · TypeScript

getFen

josefjadrny/js-chess-engine · src/index.ts:432

export function getFen(config: BoardConfig | string): string {
    const game = new Game(config);
    return game.exportFEN();
}

/**
 * Make a move on a board
 *
 * @param config - Board configuration or FEN string
 * @param from - From square
 * @param to - To square
 * @returns Board configuration after the move
 */
export function move(config: BoardConfig | string, from: string, to: string): BoardConfig {
    const game = new Game(config);
    return game.move(from, to);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…