Several functions to generate the minesweeper grid.
1 2 3 4 5 6 7 8 9 | grid_init(N)
grid_gen_mines(grid, n_mines)
grid_numbers(grid)
grid_data(grid, N)
generate_spatial_grid(N, n_mines)
|
N |
size of the grid |
grid |
the grid |
n_mines |
number of mines |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.