Package org.drools.examples.sudoku
Class Sudoku
java.lang.Object
org.drools.examples.sudoku.swing.AbstractSudokuGridModel
org.drools.examples.sudoku.Sudoku
- All Implemented Interfaces:
SudokuGridModel
An object of this class solves Sudoku problems.
-
Field Summary
FieldsFields inherited from interface org.drools.examples.sudoku.swing.SudokuGridModel
INNER_GRID_HEIGHT, INNER_GRID_WIDTH, NUM_COLS, NUM_ROWS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks that everything is still according to the sudoku rules.voiddumpGrid()Nice printout of the grid.getCellValue(int iRow, int iCol) booleanisSolved()booleanvoidsetCellValues(Integer[][] cellValues) voidsolve()voidstep()toString()voidvalidate()Methods inherited from class org.drools.examples.sudoku.swing.AbstractSudokuGridModel
addSudokuGridListener, fireCellUpdatedEvent, fireRestartEvent, removeSudokuGridListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.examples.sudoku.swing.SudokuGridModel
addSudokuGridListener, removeSudokuGridListener
-
Field Details
-
sudoku
-
cells
-
-
Constructor Details
-
Sudoku
Constructor.
-
-
Method Details
-
getCellValue
- Specified by:
getCellValuein interfaceSudokuGridModel
-
dumpGrid
public void dumpGrid()Nice printout of the grid. -
consistencyCheck
public void consistencyCheck()Checks that everything is still according to the sudoku rules. -
solve
public void solve()- Specified by:
solvein interfaceSudokuGridModel
-
step
public void step()- Specified by:
stepin interfaceSudokuGridModel
-
isSolved
public boolean isSolved() -
isUnsolvable
public boolean isUnsolvable() -
setCellValues
- Specified by:
setCellValuesin interfaceSudokuGridModel
-
toString
-
validate
public void validate()
-