Understanding the Problem
Get an overview of the problem in this chapter and try to understand it.
We'll cover the following
Problem
We have a rectangular grid of cells, where each cell can be in one of the following states:
-
It can have a number from 1 to 8 representing the count of mines in the adjacent cells (including diagonals).
-
It can be an empty cell that represents neither a mine nor a number.
-
It can be a mine.
The game starts as follows:
-
All the squares are covered at the start. We can uncover a square by left-clicking it.
-
When we uncover a square, it will either be empty, contain a number, or contain a mine. If a mine is uncovered, the game ends. The number represents how many mines are adjacent to that square (in the eight surrounding squares). If a square has no mines nearby, it will be completely empty.
-
If we suspect a square contains a mine, we can mark it with a flag by right-clicking it to prevent accidental clicks.
In this game, the goal is to utilize the provided clues to accurately locate all the mines, mark them with flags, and uncover all the cells without triggering any explosions.
Get hands-on with 1400+ tech skills courses.