I am about to design my own minesweeper in Java. And while analyzing the real windows 7 minesweeper, I came across this situation.
The uncovered square(pointed by arrow), may be 1 or mayn't have any number(an empty square). But in windows 7 minesweeper, this square has 1.
hypothesis: And by analyzing I came to know that all the mines are always surrounded by numbers.
If I go with my hypothesis, then no other go, the uncovered square should be 1.
And designing the logic for the minesweeper will be easier, if I follow this hypothesis. since,
step 1: Randomly assign the squares with mines.(Make the specific (i,j)element in the 2D array to be -1).
step 2: Number each square, equal to the number of mines surrounding it. (In this case, the hypothesis became true).
And my questions are,
- What wrong if the uncovered square is an empty square?
- Does that hypothesis is the rule in minesweeper?
- Does I have to follow the hypothesis, to make my coding simpler to implement?
- *If I proposed a new minesweeper with the rule against the hypothesis, does my new minesweeper will end up in instability?Is so,how?
*->I am not intentionally breaking the rules, I try to removing redundant hint/keys to the user.
Of course the pointed square has a number - it is adjacent to (exactly one) mine square so it gets a 1. The empty squares are just shorhand for zero.