Description Usage Arguments Value Examples
Checks if a board matrix is valid. By definition, a valid board matrix is a square matrix containing only 0, 1 and 2s. If the input is invalid, this function throws an error, otherwise it returns TRUE.
1 | is_valid(board_mat)
|
board_mat |
Board matrix to be checked. |
Either throws an error or returns TRUE
1 2 | is_valid(generate_board_mat()) # should return TRUE
is_valid(generate_board_mat(n=1)) # should return TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.