# Minesweeper

> Every number counts the mines in the eight cells around it.

Kind of puzzle: Shading

Web page: https://inkit.games/puzzles/minesweeper

## Origin

Minesweeper goes back to computer games like Ian Andrew's Mined-Out (1983) and became famous through the version Robert Donner and Curt Johnson wrote for Microsoft Windows in 1990.

## Credit

- Popularized by: Microsoft's Minesweeper (1990)
- Robert Donner and Curt Johnson wrote it.
- Source: [Wikipedia](https://en.wikipedia.org/wiki/Minesweeper_(video_game))

## Rules

1. A number counts the mines in the eight cells around it, diagonals included. Numbered cells are never mines.
   - ✓ Right: 2 around it
   - ✗ Wrong: Not 1

## Worked example: Dig Site

A 6×6 Minesweeper puzzle, with exactly one solution.

The givens, as inkit's puzzle engine writes them (cells are [row, column] from 0 at the top left):

```json
[{"at":"cell","cell":[5,3],"kind":"number","value":2},{"at":"cell","cell":[2,4],"kind":"number","value":3},{"at":"cell","cell":[1,1],"kind":"number","value":2},{"at":"cell","cell":[1,4],"kind":"number","value":1},{"at":"cell","cell":[3,1],"kind":"number","value":4},{"at":"cell","cell":[5,0],"kind":"number","value":0},{"at":"cell","cell":[3,4],"kind":"number","value":4},{"at":"cell","cell":[5,5],"kind":"number","value":1},{"at":"cell","cell":[2,3],"kind":"number","value":1},{"at":"cell","cell":[4,4],"kind":"number","value":4}]
```

The solution, a line per row (`#` is a marked cell (shaded, or whatever this type places in a cell), `.` is left empty):

```
......
.....#
##....
#..#.#
..##.#
......
```

Play it: https://inkit.games/g/minesweeper-1

## Playing on inkit

Tap a cell to place a mine, again for a dot (safe), again to clear.
