minesweeper icon indicating copy to clipboard operation
minesweeper copied to clipboard

False Positive for solving puzzle

Open JFed-9 opened this issue 3 years ago • 2 comments
trafficstars

I'll attach a screenshot. I was guessing where the last two mines could be, got one right and one wrong. As I was clicking through the safe tiles, it said I finished the game, but one of my flags was incorrect. If you look closely at the bottom right, there's a 3 with 4 flags next to it. The flag should be on the box below it.

image

JFed-9 avatar Dec 08 '21 03:12 JFed-9

any idea how to fix this?

lolaswift avatar Feb 22 '23 01:02 lolaswift

To be honest, I haven't had a lot of time to go over your code (which is impressively concise and elegant by the way). But if I were to guess, it has something to do with the flagging/revealing functions. The win check is fine, it should work as expected. But just now as I was testing, I had another experience where there was one mine and one free space left, I flagged the free space and unflagged a random mine, and it decided to click the unrevealed mine and lose the game. I can't quite put my finger on it, but the flagging/revealing functions are what I would look into.

JFed-9 avatar Feb 23 '23 01:02 JFed-9