Package io.github.skenvy
Class SudokuGrid
- java.lang.Object
-
- io.github.skenvy.SudokuGrid
-
public class SudokuGrid extends Object
A Sudoku Grid ~ the whole "board" with N rows, columns, and boxes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SudokuGrid.SudokuCellGridException
Used for cell related exceptions.class
SudokuGrid.SudokuCellGridInvalidGridShapeException
-
Constructor Summary
Constructors Constructor Description SudokuGrid()
Initialise an empty sudoku grid for a standard Sudoku board.SudokuGrid(int boardSize)
Initialise an empty sudoku grid for a custom sized Sudoku board.SudokuGrid(SudokuGrid initialGrid, boolean exactReplica)
Initialise a grid from one already established.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CellCollection>
getBoxes()
List<CellCollection>
getColumns()
List<CellCollection>
getRows()
-
-
-
Constructor Detail
-
SudokuGrid
public SudokuGrid() throws SudokuGrid.SudokuCellGridInvalidGridShapeException, Cell.SudokuCellInvalidInitialValueException
Initialise an empty sudoku grid for a standard Sudoku board.
-
SudokuGrid
public SudokuGrid(int boardSize) throws SudokuGrid.SudokuCellGridInvalidGridShapeException, Cell.SudokuCellInvalidInitialValueException
Initialise an empty sudoku grid for a custom sized Sudoku board.
-
SudokuGrid
public SudokuGrid(SudokuGrid initialGrid, boolean exactReplica) throws SudokuGrid.SudokuCellGridInvalidGridShapeException, Cell.SudokuCellInvalidInitialValueException
Initialise a grid from one already established.
-
-
Method Detail
-
getRows
public List<CellCollection> getRows()
-
getColumns
public List<CellCollection> getColumns()
-
getBoxes
public List<CellCollection> getBoxes()
-
-