|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.act365.sudoku.InvulnerableState
InvulnerableState records the number of cells that would remain unresolved for each given move (ie each cell/value pair).
Constructor Summary | |
InvulnerableState()
|
Method Summary | |
void |
addMove(int x,
int y,
int value)
Adds the move (x,y):=v to the state grid. |
void |
eliminateMove(int x,
int y,
int value)
Eliminates the move (x,y):=v from the current state grid. |
void |
popState(int nMoves)
Reads the state gris from the stack at the appropriate position. |
void |
pushState(int nMoves)
Writes the state grid to the stack at the appropriate position. |
void |
setup(int boxesAcross,
int boxesDown)
Sets the state grid to the appropriate size. |
java.lang.String |
toString()
Produces a string representation of the state grid. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public InvulnerableState()
Method Detail |
public void setup(int boxesAcross, int boxesDown)
setup
in interface IState
IState.setup(int,int)
public void pushState(int nMoves)
pushState
in interface IState
nMoves
- thread position to which state should be writtenIState.pushState(int)
public void popState(int nMoves)
popState
in interface IState
nMoves
- thread position from which state should be readIState.popState(int)
public void addMove(int x, int y, int value) throws java.lang.Exception
addMove
in interface IState
value
- is in the range [0,cellsInRow), not [1,cellsInRow].
java.lang.Exception
IState.addMove(int, int, int)
public void eliminateMove(int x, int y, int value)
eliminateMove
in interface IState
value
- is in the range [0,cellsInRow), not [1,cellsInRow].IState.eliminateMove(int, int, int)
public java.lang.String toString()
toString
in interface IState
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |