Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reveal number panel neighbors on "both buttons clicked" #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bNobo
Copy link

@bNobo bNobo commented May 11, 2023

In the original minesweeper game, there is a feature that is very practical and time saving but few people knows about it : when both mouse buttons are pressed at the same time and then released, it reveals every neighboring panels that are not flagged.

For instance, in this situation:

image

We can be certain that there are no mines left around the "1" that is on the left side of the flag. Instead of clicking on each of the three panels under it, we can just press the two mouse buttons at the same time on the "1" panel and when we release at least one button the three panels under it are revealed:

image

Obviously, if there is a mine under a panel that is not marked with a flag, you will still loose the game if you click on it this way.

In this PR I slighly modified the code to permit the "both buttons clicked" feature.

when both mouse buttons have been pressed at the same time
@bNobo bNobo changed the title reveal number panel neighbors on mouseup reveal number panel neighbors on "both buttons clicked" May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant