At least newer versions of minesweeper usually guarantee your first square is a zero cell, and automatically reveal all cells around any zero cell the player clicks on. While the latter can't really be done with discord spoilers during the game, forcing a start from zero is possible (assuming a zero cell exists), and pre-revealing cells from that point is as well.
This PR adds an option, zeroFirstCell, which will enable both of these behaviours. It is by default set to true, but won't do anything if revealFirstCell is false.
Currently there is no option to disable the recursive reveal feature, as I didn't consider it necessary, but it would be easy to implement if desired.
If there are no zero cells in the grid, this automatically falls back to the normal behaviour (i.e. revealing a random SafeCell).
At least newer versions of minesweeper usually guarantee your first square is a zero cell, and automatically reveal all cells around any zero cell the player clicks on. While the latter can't really be done with discord spoilers during the game, forcing a start from zero is possible (assuming a zero cell exists), and pre-revealing cells from that point is as well.
This PR adds an option,
zeroFirstCell
, which will enable both of these behaviours. It is by default set totrue
, but won't do anything ifrevealFirstCell
isfalse
.Currently there is no option to disable the recursive reveal feature, as I didn't consider it necessary, but it would be easy to implement if desired.
If there are no zero cells in the grid, this automatically falls back to the normal behaviour (i.e. revealing a random
SafeCell
).