|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsudoku.PlayEngine
public class PlayEngine
The guts of Sudoku. The PlayEngine is capable of finding correct moves.
| Constructor Summary | |
|---|---|
PlayEngine(Field field)
Create a PlayEngine to play the given field. |
|
| Method Summary | |
|---|---|
Field |
playRandomlyUntilSolvedOrQuit()
Alternative solver that makes random choices at random locations to create a new solution, typically from an empty field. |
Field |
playUntilSolvedOrQuit()
Main playing routine. |
void |
setCheckMultiples(boolean check)
Call this method with an argument of true to have the PlayEngine check for multiple solutions and give an exception if found. |
void |
setNoBacktrack()
Call this method if PlayEngine is to disallow backtracking. |
static SolutionType |
verify(Field f)
Play out the argument field to see if it is solvable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlayEngine(Field field)
field - | Method Detail |
|---|
public void setNoBacktrack()
public void setCheckMultiples(boolean check)
check - public static SolutionType verify(Field f)
f -
public Field playUntilSolvedOrQuit()
throws MultipleSolutionException
MultipleSolutionException - if checkMultiples(true) called first and
there is more than one solution possible.public Field playRandomlyUntilSolvedOrQuit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||