update_board | R Documentation |
This function updates a chessboard to show the position after a move is
made. It returns a list containing the updated board and the status of the
game. See fen_to_board()
for details of the board format.
update_board(move, board)
move |
A single-element character vector consisting of a legal chess move in UCI long algebraic notation. |
board |
A list where the first element is a matrix representing the chessboard, and the remaining 5 elements are the same as in a FEN string. |
A list containing the updated board and status. The list names should be board, to_move, castling_rights, ep_target, halfmove_clock, and fullmove_number.
board <- fen_to_board()
move <- 'e2e4'
update_board(move, board)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.