View source: R/is_insufficient.R
is_insufficient | R Documentation |
If mate is impossible due to lack of material, is_insufficient()
returns
TRUE
. In cases where mate is theoretically possible is_insufficient()
will return FALSE
even if mate can't be forced.
is_insufficient(board)
board |
An 8x8 matrix representing the chess board. |
Only the following material combinations are considered to be insufficient:
King versus king
King and bishop versus king
King and knight versus king
King versus king with any number of bishops on either side, if all bishops are on the same color squares
A Boolean indicating whether there is insufficient material.
board <- matrix(rep("", 64), nrow = 8)
board[c(1, 64)] <- c("K", "k") # King versus king
is_insufficient(board)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.