Original SudokuSolver.java interface, untouched
This commit is contained in:
parent
1d016ee97f
commit
6de3e286ed
1 changed files with 31 additions and 0 deletions
31
app/src/main/java/sudoku/SudokuSolver.java
Normal file
31
app/src/main/java/sudoku/SudokuSolver.java
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
package sudoku;
|
||||||
|
|
||||||
|
public interface SudokuSolver{
|
||||||
|
|
||||||
|
// Work in progress
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set sudoku board, numbers 1-9 are fixed values, 0 is unsolved.
|
||||||
|
*/
|
||||||
|
void setBoard(int[][] board);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the sudoku board
|
||||||
|
*/
|
||||||
|
int[][] getBoard();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Solve soduko
|
||||||
|
* @return true if solution could be found
|
||||||
|
*/
|
||||||
|
boolean solve();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if digit is legal on the current board
|
||||||
|
* @param row
|
||||||
|
* @param col
|
||||||
|
* @param nbr
|
||||||
|
* @return true if legal
|
||||||
|
*/
|
||||||
|
boolean legal(int row, int col, int nbr);
|
||||||
|
}
|
Loading…
Reference in a new issue