Build classic Minesweeper with auto-reveal for empty cells, flagging, custom grid sizes, a timer, and first-click safety guarantee (never hit a mine on first click).
classicpuzzleminesweeperlogic
Objectives
Generate a random minefield with adjacency numbers
Implement recursive reveal for empty cells
Add right-click flagging with flag counter
Support custom grid sizes and mine counts
Guarantee first click is always safe
Hints
Generate mines after first click to ensure safety
Use flood-fill algorithm for empty cell reveal
Track remaining mines = total mines - flags placed