Monday, May 24, 2010

I am programming minesweeper in java and I need help with the rules?

Sometimes when I click one box with no mine, a bunch of boxes with no mines open like a chain reaction. When and why does this happen?

I am programming minesweeper in java and I need help with the rules?
If the box clicked has no mines in the eight squares surrounding it (would have a '0' if there was a number), there cannot possibly be a mine in any of the squares, so those squares are automatically clicked. The chain reaction occurs when revealing these eight squares cause more would-be '0's to be revealed. If you're programming the game, it is not necessary for this to happen, but instead put a 0 in the box. The auto-clicking is only done to save time in solving.
Reply:hey! you have my avatar!


No comments:

Post a Comment