Explicit null, slight restructure

This commit is contained in:
Imbus 2023-12-05 15:55:40 +01:00
parent 6b60cac90a
commit 24463fe920

View file

@ -1,7 +1,7 @@
package sudoku;
public class Solver implements SudokuSolver {
private int[][] board;
private int[][] board = null;
public Solver() {
board = new int[9][9];
@ -15,10 +15,6 @@ public class Solver implements SudokuSolver {
return board;
}
public boolean solve() {
return solve(0, 0);
}
/**
* Resets the board to all zeros
*/
@ -26,6 +22,10 @@ public class Solver implements SudokuSolver {
board = new int[9][9];
}
public boolean solve() {
return solve(0, 0);
}
/**
* Recursive helper method for solve()
*