is_checkmate | R Documentation |
Check if the current board state is a checkmate
is_checkmate(board, color = board$to_move)
board |
A list containing the 8x8 matrix |
color |
The color of the player to check for checkmate. Default is |
TRUE if the player of the specified color is in checkmate, FALSE otherwise.
# Starting position
board <- fen_to_board()
is_checkmate(board)
# Fool's mate
board <- fen_to_board("rnbqkbnr/ppppp1pp/8/8/4pP1q/8/PPPPP1PP/RNBQKBNR w KQkq - 0 3")
is_checkmate(board)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.