Minesweeper Lab
A revealed number counts mines in its eight surrounding cells, including diagonals. The first revealed cell and its neighbors are excluded from mine placement. Zero cells flood-reveal unmarked safe neighbors. Reveal every safe cell to win; opening a mine loses. Flags are optional for the win rule.
Key features
- 5×5 to 14×14 board with mine count and replayable seed
- Deterministic placement outside the first reveal's 3×3 safe zone
- Eight-neighbor counts and breadth-first zero-cell flood reveal
- None→flag→question mark cycle, right click, touch mode and F key
- Win by revealing all safe cells, lose on a mine, then show the finished board
- Strict version 1 JSON with replayed actions, action CSV and finished-board CSV
How to use
- Choose 5–14 rows and columns, a mine count and a seed, then start a game.
- In Reveal mode, open the first cell; it and all on-board neighbors have no mines.
- Use the exposed numbers to infer all eight neighbors; cycle flags and question marks with Mark mode, right click or F.
- Continue until all safe cells are revealed or a mine is opened.
- Save the session JSON or action CSV, and after the result download the full mine/count board CSV to compare with the seed and first click.
Use cases
- Practice reasoning from adjacent mine counts and empty regions
- Compare the same seed and first click with a friend
- Use flags and question marks as hypotheses with keyboard or touch
Frequently asked questions
How safe is the first click?
The first actually revealed cell and its on-board eight neighbors are excluded from mine candidates. You may flag before the first reveal, but a flagged cell cannot be opened and does not count as the first click.
How do flags and question marks work?
Each Mark action cycles hidden→flag→question→hidden. Flags block direct and automatic reveal. Question marks survive automatic flood, but directly opening one clears the question mark and reveals the cell.
Must every mine have a flag to win?
No. Reveal all non-mine cells to win. If a mistaken flag covers a safe cell, remove it and reveal that cell.
Do the saved record and seed prove competitive fairness?
The version 1 JSON replays each action and checks the resulting state and mine layout. The same settings, seed and first reveal produce the same layout. Anyone with the seed can compute mine positions, so this does not prevent cheating or certify a competition.
Does the board go to a server?
No. Generation, play, validation and exports run in the browser tab. Files are saved locally only on request.
Privacy
Settings and actions stay in the current browser tab. JSON and CSV are downloaded only when requested, with no automatic remote submission.
Comments & questions