Description Usage Arguments Value Examples
generate_board_mat function; generates a board matrix given 'n' and 'p' input
1 | generate_board_mat(n = 5, p = 0.25)
|
n |
a positive integer denote the size of the board |
p |
a number between 0 and 1 that denotes the fraction of the n^2 squares are blocked |
a matrix with random (0, 1) (n^2 size with ((n^2) * p) number of blocked (0), and the rest non blocked = (n^2) - blocked(0)
1 | generate_board_mat(), generate_board_mat(n = 5, p = 0.25), generate_board_mat(n = 8, p = 0.75)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.