Devise a Plan: Solution
Devise a plan to solve the problem.
We'll cover the following
We have our strategy. Now, we can try to solve the problem, but how? Here are some important questions to raise:
-
How can we deduce if a cell has a mine?
-
Is there any pattern?
-
Is there any specific way to solve this problem?
How to play
We discussed the basics of the game in the last lesson. There are some starting steps that will help us solve the problem. We can divide our game into multiple parts and try to solve it for each part. Let’s go through some scenarios first to understand how it works.
Exact match
First, if the unopened cells surrounding a number precisely match the remaining mines in its proximity, those cells must be identified as mines. A number has the same number of mines in its adjacent cell.
For example, in the below widget, we have one unopened cell around the “1” cell, meaning it is a mine.
Get hands-on with 1400+ tech skills courses.