Minesweeper
Playable minesweeper: left click opens a cell, right click flags it (or use flag mode), and the first click plus its eight neighbours are always mine-free. It tracks mines left, opened safe cells and the cleared/boom state, lets you undo one step after a mine, and its hint points at a cell that is definitely safe.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Minesweeper board
Click a cell to open it (a 0 floods its neighbours), right-click or switch on flag mode to plant a flag; the very first cell is always safe.
- Mines left
- 10
- Opened
- 0 / 71
- Mines
- 10
- Flags
- 0
Mouse: left click opens, right click flags; with flag mode on, a left click flags too.
Action log
0 actions this field
No actions recorded yet
What this tool does
- Play minesweeper right here: left click opens a cell, right click plants a flag (or switch on flag mode and use the left button). The number is how many of the eight neighbours are mines; open every safe cell to clear the field.
- Reproduce the same field from a seed: the same seed, size and mine count place the mines cell by cell, which is handy for racing a friend.
- Stepped on a mine? Press Undo to go back one step, or press Hint and let the page point at a cell that is definitely safe.
Example
Input
field seed demo · 9×9 · 10 mines · first click on row 5, column 5
Output
000000000 011211000 12***1000 ***211000 ***100000 ***212232 ********* ********* ********* 42 / 71 safe cells opened · 10 mines not flagged yet
The first click lands in the middle: the first cell and its eight neighbours are kept mine-free, so 42 safe cells open at once. `*` marks cells that are still closed.
Frequently asked questions
How do I play?
Left click opens a cell (a neighbour count of 0 floods the surrounding area) and right click plants or removes a flag. On a touch screen, or if you prefer the left button, switch on flag mode and a left click flags instead. Open cells cannot be flagged, and a flagged cell will not open, so you never blow up a mine you already marked.
Is the first click always safe?
Yes. Mines are placed when you make the first click, and that call removes the clicked cell and its eight neighbours from the mine pool, so the opening move can never explode.
Are the mines random, and can I reproduce a field?
They are not random: the field is determined by the seed (through xorshift128) plus the size and mine count, so the same three always give the same picture. "New field" re-generates from your inputs, while "Restart this field" reuses the same parameters and reproduces the previous field exactly.
When do I win, and what happens when I hit a mine?
You clear the field when every safe cell is open and no mine was hit — the page then shows the win panel with your open and flag counts. Hitting a mine turns the notice red and marks the mine you stepped on; press Undo to go back one step and keep reasoning, or restart the field.
What exactly does the hint know?
The hint does not guess neighbour counts. It picks a cell from the local field that is definitely not a mine and is still closed, because it reads the real field stored in your browser — so clicking it is always safe. Once every safe cell is open there is nothing left to hint.
Is anything uploaded?
Everything runs in your browser: no network requests and no saved progress, so a reload starts a new field. Columns and rows accept 2–30, and the mine count can go up to (cells − 9).
Keywords:minesweeper