4 ms·
oh yes. I did not think of that. generating on first click should not be to difficult. what are the other constraints?
by sneakypeet 8y ago
oh yes. I did not think of that. generating on first click should not be to difficult. what are the other constraints?
- pbhjpbhj 8y agoNot parent: if you click a square and it says 7/6 then sometimes (next to a corner) you can only guess, you can't deduce the correct square to flag. There are others.
- aardvark179 8y agoYou can’t have enclosed areas that contain mines, there’s probably a few others. The easiest thing to do is to write a solver which will iteratively mark squares it knows to contain a mine, or knows don’t contain a mine. If the solver can find all the mines the board is solvable. Only present the user with boards that your solver can solve.
- simcop2387 8y agoA convinent source of information about this is going to be Simon Tatham's excellent puzzle suite. Most the puzzles are built to ensure a solution without guessing. https://www.chiark.greenend.org.uk/~sgtatham/puzzles/doc/mines.html#mines https://www.chiark.greenend.org.uk/~sgtatham/puzzles/doc/min... https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ They're all open source and I believe available on iOS as well as android for free for mobile users too.