I am presently re-creating minesweaper game.. (using crappy BGI in concole)..
I am struck here
In minesweaper when i click some blocks many blocks are automatically cleared.. WHat is the logic behind this clearing.. Is it just random or what..
I am presently re-creating minesweaper game.. (using crappy BGI in concole)..
I am struck here
In minesweaper when i click some blocks many blocks are automatically cleared.. WHat is the logic behind this clearing.. Is it just random or what..
I believe they are automatically cleared for you if there are no mines nearby, i.e. the number displayed in that cell, if it were to be shown at all, would be zero.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
hmm.. a little more precise would help..
The blocks clear when you click on a spot that is touching no mines. What happens is that it automatically clicks on all spots around this empty cell, and if THAT hits an empty cell then it repeats it for that spot. This continues until all available spots are clicked.