project organization/optimization/documentation. began implementing basic board class.
This commit is contained in:
+1
-3
@@ -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
@@ -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
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user