I've written the minesweeper game for C++, and the core game is complete.
There are three things I need to ask.
Currently, my mines are placed at random positions.. I was wondering if this is true for the actual game? Are the mines random or is their some specific pattern or algorithm for placing the mines.
When I play minesweeper on Win 7, I never see a 0. But in my program, there are cases when all 8 neighbors are non mines. What should I display then? I want the game to be as close to the Windows version as possible.
I think this may be related to 2 above, when I play on Win 7 sometimes when I click on a cell multiple cells are revealed. I want to do this in my program but I don't know the controlling logic behind it. I mean, when does this have to happen? And when it does happen, how do I know how many and which cells to open up?
On a related note, my current program is text based (in code blocks). Currently I know only C++. What do I need to learn to be able to make the game interactive?
Yes they are placed at random. You need to make sure that you don't place two mines in the same spot.
A 0 is displayed as a blank in windows.
When you expose a square with no adjacent mines, it will automatically expose all 8 of those squares. If any of those are also zeros, they will be exposed also until an entire region is exposed.