|
-
May 20th, 2008, 08:16 AM
#1
Thread Starter
Hyperactive Member
Minesweeper probability
hi everyone,
I'm working on a minesweeper program which will calc the probability of all undiscovered squares on the grid.. bit have got a bit stuck:
what happens where an undiscovered square is touching two numbers, like:
? ? ? ? ?
2 ? ? ? ?
? ? 3 ? ?
? ? ? ? ?
in this example, all the squares touching the 3 have a 3 in 8 chance of containing a mine, and the squares touching the 2 have a 2 in 5 chance, but what about the 2 that are touching both?
also, on this grid there could be 3, 4, or 5 mines in total touching the 2 and/or the 3, so there isnt a definite amount of mines remaining for me to calculate the odds for the rest of the grid, so how can i calculate the odds of the squares that are currently not touching any numbers?
thanks!
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|