Skip to content

Commit

Permalink
Update BoardListener.java
Browse files Browse the repository at this point in the history
  • Loading branch information
kek-Sec committed Feb 7, 2022
1 parent 29821a6 commit 8c2ddea
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ public void mouseClicked(java.awt.event.MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e)) {
// get the square that was clicked
Square square = squares[row][col];
// if square is flagged , do nothing
if (square.isFlagged()) {
return;
}
// if square is revealed , do nothing
if (square.isRevealed()) {
return;
}

}
// if right click
Expand Down

0 comments on commit 8c2ddea

Please sign in to comment.