Description Usage Arguments Value Examples
Randomly generate a legal, dry board per inputted instructions.
1 | generate_board_mat(n = 5, p = 0.25)
|
n |
A positive integer denoting the dimension of the square board. |
p |
A float between 0 to 1 that denotes the fraction of the n^2 squares are blocked |
The n-by-n board matrix with floor(p*n^2) blocked squares
1 | 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.