From 0f4b78be2f522791eec525eade28652ea0e8ac9f Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Sun, 24 Mar 2024 12:11:51 -0600 Subject: [PATCH] added deselection support, though still buggy. additionally, altered default theme for easier viewing and for aesthetics --- src/gui/Board.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/gui/Board.java b/src/gui/Board.java index 52840cb..12e231f 100644 --- a/src/gui/Board.java +++ b/src/gui/Board.java @@ -107,10 +107,8 @@ public class Board extends JPanel { int row = selected.cell.getRow(); int col = selected.cell.getCol(); - if( - (row == selected.cell.getRow() && n == selected.cell.getCol()) || - (col == selected.cell.getCol() && n == selected.cell.getRow()) - ) continue; + if((n == selected.cell.getCol()) || (n == selected.cell.getRow())) + continue; gridGUI[n][col].select(); gridGUI[row][n].select(); @@ -143,11 +141,6 @@ public class Board extends JPanel { int col = boxCol * 3 + m; if(row == selected.cell.getRow() || col == selected.cell.getCol()) continue; - if( - (row == selected.cell.getRow() && n == selected.cell.getCol()) || - (col == selected.cell.getCol() && n == selected.cell.getRow()) - ) continue; - gridGUI[row][col].select(); } }