# Minesweeper

Remaining Bombs: 40

You lose...

*How to Play*

This game of Minesweeper is played on a 16x16 grid. Each of those dark grey squares is called a cell. Some cells are covering bombs, and if you left-click one of those cells, you lose the game! To win, you must identify all the bombs by right-clicking them (they will turn red) and opening the other cells (they will turn light grey).

So how can you tell which cells are bombs? Start by left-clicking one of the cells. This will "open" the surrounding cells. What do the numbers on the cells mean? If a cell is blank (no number), that means it is touching zero bombs in the surrounding eight cells. If a cell has a 1-8 on it, there are that many bombs in the surrounding 8 cells. A 1-cell has 1 bomb in the surruonding area, a 2-cell has 2 bombs in the surrounding area, and so on. Start playing to see if you can figure it out, or read below for the logic approach.

**Only N cells remaining**: Let's say you're looking at a 3-cell. If 5 of the cells around it have been opened so that there are only 3 closed cells remaining, *all* 3 of those cells are bombs. The 3 bombs cannot repeat in a cell, so they must live in *exactly* 3 cells. Show **Only N cells** Example.

**Already found the bomb**: For example, if a 2-cell is already touching exactly 2 bombs, you can clear the reamining cells. Show **Already found** Example

**1-2-1**: If you have a row of numbers in order of 1-2-1, and the 2 has exactly 3 closed cells remaining, the center closed cell is never a bomb. Why does this work? Assume for contradiction that the middle cell is a bomb. Both of the 1-cells can be opened by "Already found the bomb." There is is nowhere left to place the 2-cell's second bomb, so it's impossible. Thus, the middle cell cannot have a bomb. Show **1-2-1** Example

**Reduction**: Let's say you have 2-3-2 in a row, but they are already all touching one bomb. That means the 2s have 1 bomb remaining, while the 3 has 2 bombs remaining. This has been reduced into a 1-2-1 situation, and you can apply that principle to this situation.