Documentation now passes the gradle doctest
This commit is contained in:
parent
71c43b35c3
commit
f449d2343e
1 changed files with 12 additions and 9 deletions
|
@ -1,5 +1,6 @@
|
||||||
package sudoku;
|
package sudoku;
|
||||||
|
|
||||||
|
/** SudokuSolver is an interface for implementing Sudoku solvers */
|
||||||
public interface SudokuSolver {
|
public interface SudokuSolver {
|
||||||
/**
|
/**
|
||||||
* Set sudoku board, numbers 1-9 are fixed values, 0 is unsolved.
|
* Set sudoku board, numbers 1-9 are fixed values, 0 is unsolved.
|
||||||
|
@ -7,10 +8,12 @@ public interface SudokuSolver {
|
||||||
* @param board a board to copy values from
|
* @param board a board to copy values from
|
||||||
* @throws IllegalArgumentException if board is invalid, e.g. not 9x9
|
* @throws IllegalArgumentException if board is invalid, e.g. not 9x9
|
||||||
*/
|
*/
|
||||||
void setBoard(int[][] board) throws IllegalArgumentException;
|
void setBoard(int[][] board) throws IllegalArgumentException, NullPointerException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a copy of the sudoku board
|
* Get a copy of the sudoku board
|
||||||
|
*
|
||||||
|
* @return a <b>copy</b> of the sudoku board
|
||||||
*/
|
*/
|
||||||
int[][] getBoard();
|
int[][] getBoard();
|
||||||
|
|
||||||
|
@ -24,9 +27,9 @@ public interface SudokuSolver {
|
||||||
/**
|
/**
|
||||||
* Check if digit is legal on the current board
|
* Check if digit is legal on the current board
|
||||||
*
|
*
|
||||||
* @param row
|
* @param row row
|
||||||
* @param col
|
* @param col column
|
||||||
* @param nbr
|
* @param nbr number to check
|
||||||
* @return true if legal
|
* @return true if legal
|
||||||
*/
|
*/
|
||||||
boolean isLegal(int row, int col, int nbr);
|
boolean isLegal(int row, int col, int nbr);
|
||||||
|
@ -34,8 +37,8 @@ public interface SudokuSolver {
|
||||||
/**
|
/**
|
||||||
* Get number on board
|
* Get number on board
|
||||||
*
|
*
|
||||||
* @param row
|
* @param row row
|
||||||
* @param col
|
* @param col column
|
||||||
* @return number on board
|
* @return number on board
|
||||||
*/
|
*/
|
||||||
int get(int row, int col);
|
int get(int row, int col);
|
||||||
|
@ -43,9 +46,9 @@ public interface SudokuSolver {
|
||||||
/**
|
/**
|
||||||
* Set number on board, numbers 1-9 are fixed values, 0 is unsolved.
|
* Set number on board, numbers 1-9 are fixed values, 0 is unsolved.
|
||||||
*
|
*
|
||||||
* @param row
|
* @param row row
|
||||||
* @param col
|
* @param col column
|
||||||
* @param nbr
|
* @param nbr number to set
|
||||||
*/
|
*/
|
||||||
void set(int row, int col, int nbr);
|
void set(int row, int col, int nbr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue