added deselection support, though still buggy. additionally, altered default theme for easier viewing and for aesthetics

This commit is contained in:
Josh Ashton
2024-03-24 12:11:51 -06:00
parent 1afd170fea
commit 0f4b78be2f
+2 -9
View File
@@ -107,10 +107,8 @@ public class Board extends JPanel {
int row = selected.cell.getRow(); int row = selected.cell.getRow();
int col = selected.cell.getCol(); int col = selected.cell.getCol();
if( if((n == selected.cell.getCol()) || (n == selected.cell.getRow()))
(row == selected.cell.getRow() && n == selected.cell.getCol()) || continue;
(col == selected.cell.getCol() && n == selected.cell.getRow())
) continue;
gridGUI[n][col].select(); gridGUI[n][col].select();
gridGUI[row][n].select(); gridGUI[row][n].select();
@@ -143,11 +141,6 @@ public class Board extends JPanel {
int col = boxCol * 3 + m; int col = boxCol * 3 + m;
if(row == selected.cell.getRow() || col == selected.cell.getCol()) continue; 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(); gridGUI[row][col].select();
} }
} }