|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.keang.sudoku.solver.AbstractSolver
uk.co.keang.sudoku.solver.BruteForceSolver
public class BruteForceSolver
Nested Class Summary |
---|
Nested classes/interfaces inherited from class uk.co.keang.sudoku.solver.AbstractSolver |
---|
AbstractSolver.SolverDifficulty |
Field Summary |
---|
Fields inherited from class uk.co.keang.sudoku.solver.AbstractSolver |
---|
found, hGrid, puzzle |
Constructor Summary | |
---|---|
BruteForceSolver(Puzzle grid,
java.util.Random r)
|
Method Summary | |
---|---|
int |
fillBlock(int blockIndex)
Fills the block index with a random set of numbers. |
int |
findSolutions()
Runs the solver once to try to resolve individual squares |
Methods inherited from class uk.co.keang.sudoku.solver.AbstractSolver |
---|
addSolverListener, fireSolutionEvent, getDifficultyFactor, getSolverDifficulty, hasSolverListeners, removeAllFromSet, removeAllSolverListeners, removeSolverListener, retainAllInSet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BruteForceSolver(Puzzle grid, java.util.Random r)
Method Detail |
---|
public int findSolutions() throws IllegalGridException
AbstractSolver
findSolutions
in class AbstractSolver
IllegalGridException
public int fillBlock(int blockIndex)
blockIndex
- - 0n based block number where blocks are number left to right and then top to bottom
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |