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 a4b8a43 commit 4bd752f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public MouseListener rightClick(Square[][] squares, int row, int col, Game game)
return new MouseListener() {
@Override
public void mouseClicked(java.awt.event.MouseEvent e) {
// if Game is over do nothing
if (game.isGameOver) {
return;
}
// if left click
if (SwingUtilities.isLeftMouseButton(e)) {
// get the square that was clicked
Expand Down

0 comments on commit 4bd752f

Please sign in to comment.