Mines (Simon Tatham's Puzzles)

Saved games stay in this browser only.

About the puzzle

Mines is the classic mine-hunting puzzle that came with every Windows PC: a grid of covered squares, some hiding mines. Uncover a safe square and it shows how many mines touch it; uncover a mine and you have lost. You win when every square without a mine is open.

Simon Tatham's version has one property that changes the game: by default it places the mines so that you never have to guess. From the first opening to the last square, there is always something you can deduce. No more reaching the final corner to find two mines, two squares and no way to tell them apart.

It also forgives mistakes. If you step on a mine, only that mine is shown, and you can press Undo and keep playing; the game counts how many times you died, so at the end you know whether you made it cleanly.

Rules

  • A number tells you how many of the neighbouring squares hold a mine. On the square grid that means the eight squares around it.
  • Squares with no mines around them open their neighbours automatically, so your first click usually opens a whole area.
  • The first square you click is always safe.
  • Flags are only notes for you; the game does not check them.

Controls

Input Action
Left click on a covered square uncover it
Right click place or remove a flag
Left click on a number clear around it: if it already has as many flags as its number, open all its other neighbours
Arrow keys (square grids) move the cursor
Enter / Space (square grids) act as the left / right button
N / U / R new game / undo / redo

The status bar shows the time, how many mines you have flagged out of the total, and how many times you died.

How to solve it

Read the ones first. A 1 with only one covered neighbour means that neighbour is a mine. Flag it, and every other neighbour of any number already satisfied by that flag is safe.

Use clear-around. Once a number has all its mines flagged, clicking it opens the rest of its neighbours in one go. It is fast, but only as reliable as your flags.

Learn the common patterns. Along a straight edge, the sequence 1-2-1 means mines under both 1s and a safe square under the 2; 1-2-2-1 puts the mines under the two middle squares. Recognising these speeds up every game.

Subtract one clue from another. If a 2 and a neighbouring 1 share covered squares, the mines the 2 needs beyond what the 1 can supply must be in the squares only the 2 touches.

Count at the end. The status bar shows how many mines remain. When the regular clues run out, the total number of mines left often settles the last area.

Grids and difficulty

The Type menu starts with the familiar square boards: 9x9 with 10 or 35 mines, 16x16 with 40 or 99, and 30x16 with 99 or 170. Further down are wrapping grids, where the edges join up, and other tilings: hexagonal (honeycomb), triangular, octagonal, snub square, Cairo, kites, Penrose tilings and even the aperiodic "hat" and "spectre" tiles. On those grids a tile's neighbours are all the tiles that touch it, even at a single corner, so a triangle can have a lot of them. Custom sets the size, the number or percentage of mines, the grid type, and lets you turn off the no-guessing guarantee if you want the old-fashioned risk.

Playing here

Click Play to open the puzzle. The menu above the board has New game, Restart, Undo, Redo and Solve (which shows the whole minefield), the Type menu with the boards, and the Game menu, where you can type in a game ID or a random seed, download the current game as a file, load a saved file and change the preferences. Your game in progress is kept in this browser and comes back the next time you open the page.

On a touch screen, a tap uncovers a square; turn on the Mark button above the board to place flags with your taps.

Credits and licence

Mines is part of Simon Tatham's Portable Puzzle Collection, written by Simon Tatham with code contributed by several other authors, and distributed with its source code under the MIT licence. This page runs a WebAssembly build made by FredyGames from the author's official source snapshot, with no changes to the puzzle; the source and the build script are hosted with the game, and the licence text is linked from this page.