|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.act365.sudoku.Traversal
A Traversal object is used to store the moves made during an attempt to solve a Su Doku puzzle. All moves are recorded, even those that are subsequently unwound. The object isn't used in anger anywhere throughout the project but it provides useful debug.
Constructor Summary | |
Traversal(int capacity,
int maxElims)
|
Method Summary | |
boolean |
addMove(int mx,
int my,
int mz)
Adds the move represented by the state trio (mx,my,mz) to the traversal. |
int |
capacity()
Returns the traversal capacity. |
int |
depth()
Returns the current size. |
int |
find(int[] findX,
int[] findY,
int[] findZ,
int nFindMoves)
Looks for the sequence of moves (findX,findY,findZ) of length nFindMoves anywhere within the traversal. |
int |
find(int start,
int end,
int[] findX,
int[] findY,
int[] findZ,
int nFindMoves)
Looks for the sequence of moves (findX,findY,findZ) of length nFindMoves within the traversal between the position start and end. |
void |
reset()
Resets the traversal. |
int |
size()
Returns the current size. |
java.lang.String |
toString()
Returns a string representation of the traversal that lists each move made. |
boolean |
unwind()
Unwinds the last move from the traversal. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Traversal(int capacity, int maxElims)
capacity
- Method Detail |
public boolean addMove(int mx, int my, int mz)
public boolean unwind()
public int find(int start, int end, int[] findX, int[] findY, int[] findZ, int nFindMoves)
public int find(int[] findX, int[] findY, int[] findZ, int nFindMoves)
public void reset()
public int size()
public int depth()
public int capacity()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |