Explicit null, slight restructure
This commit is contained in:
parent
6b60cac90a
commit
24463fe920
1 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
package sudoku;
|
package sudoku;
|
||||||
|
|
||||||
public class Solver implements SudokuSolver {
|
public class Solver implements SudokuSolver {
|
||||||
private int[][] board;
|
private int[][] board = null;
|
||||||
|
|
||||||
public Solver() {
|
public Solver() {
|
||||||
board = new int[9][9];
|
board = new int[9][9];
|
||||||
|
@ -15,10 +15,6 @@ public class Solver implements SudokuSolver {
|
||||||
return board;
|
return board;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean solve() {
|
|
||||||
return solve(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the board to all zeros
|
* Resets the board to all zeros
|
||||||
*/
|
*/
|
||||||
|
@ -26,6 +22,10 @@ public class Solver implements SudokuSolver {
|
||||||
board = new int[9][9];
|
board = new int[9][9];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean solve() {
|
||||||
|
return solve(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursive helper method for solve()
|
* Recursive helper method for solve()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue