project organization/optimization/documentation. began implementing basic board class.

This commit is contained in:
Josh Ashton
2024-03-21 15:21:34 -06:00
parent 3477cc53ed
commit e6a299906a
3 changed files with 14 additions and 8 deletions
+1 -3
View File
@@ -7,7 +7,6 @@ import gui.backend.Settings;
import gui.backend.SudokuChecker; import gui.backend.SudokuChecker;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension;
/** /**
* Runner class for the Sudoku App, managing the GUI and coordinating * Runner class for the Sudoku App, managing the GUI and coordinating
@@ -19,7 +18,6 @@ public class App extends JFrame {
// Data fields // Data fields
private Settings s; private Settings s;
private SudokuChecker checker;
/** /**
* Create a new App object, initializing the GUI and internal logic. * Create a new App object, initializing the GUI and internal logic.
@@ -79,7 +77,7 @@ public class App extends JFrame {
*/ */
public static void cli() { public static void cli() {
Nav nav = new Nav(new Settings(), true); Nav nav = new Nav(new Settings(), true);
SudokuChecker check = new SudokuChecker(nav.getLoadedGrid()); new SudokuChecker(nav.getLoadedGrid());
} }
/** /**
+10 -2
View File
@@ -1,5 +1,7 @@
package gui; package gui;
import java.awt.GridLayout;
import javax.swing.JPanel; import javax.swing.JPanel;
import gui.backend.Settings; import gui.backend.Settings;
@@ -17,15 +19,17 @@ import gui.backend.Settings;
*/ */
public class Board extends JPanel { public class Board extends JPanel {
private Settings s; private Settings s;
private Cell[][] grid;
/** /**
* Create a new Board object with the default styling from settings. * Create a new Board object with the default styling from settings.
* *
* @param s * @param s
*/ */
public Board(Settings s) { public Board(Settings s, Cell[][] grid) {
super(); super(new GridLayout(9, 9));
this.s = s; this.s = s;
this.grid = grid;
style(); style();
} }
@@ -35,4 +39,8 @@ public class Board extends JPanel {
private void style() { private void style() {
// TODO: Style the Board Panel. // TODO: Style the Board Panel.
} }
private void createBoard() {
// TODO: Create the board with the given grid.
}
} }
+3 -3
View File
@@ -4,9 +4,9 @@ function Run {
) )
javac *.java javac *.java
java App $flag java App $flag
rm *.class Remove-Item *.class
rm gui/*.class Remove-Item gui/*.class
rm gui/backend/*.class Remove-Item gui/backend/*.class
} }
if ($args.Length -eq 1) { if ($args.Length -eq 1) {