|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.act365.sudoku.StrategyBase
StrategyBase handles several thread-related function common to most implementors of IStrategy.
IStrategy
Method Summary | |
boolean |
explainsReasoning()
Indicates whether the strategy explains its reasoning. |
java.lang.String |
getBestReason()
Returns the reason for the best move. |
int |
getBestValue()
Returns the value of the best candidate move. |
int |
getBestX()
Returns the x-coordinate of the best candidate move. |
int |
getBestY()
Returns the y-coordinate of the best candidate move. |
int |
getLastWrittenMove()
Returns the number of moves that had been made at the last point where two alternative moves existed. |
int |
getNumberOfCandidates()
Returns the umber of candidates. |
java.lang.String |
getReason(int move)
Returns the reasoning behind the given move. |
java.lang.String |
getReasonCandidate(int index)
Reasons the reason behind the given candidate. |
int |
getScore()
Returns a measure of the confidence the strategy holds in its candidates. |
int |
getThreadLength()
Returns thread length. |
int |
getThreadX(int move)
Returns x-coordinate of move at given thread position. |
int |
getThreadY(int move)
Returns y-coordinate of move at given thread position. |
int |
getValueCandidate(int index)
Returns the value-coordinate of the given candidate. |
int |
getXCandidate(int index)
Returns the x-coordinate of the given candidate. |
int |
getYCandidate(int index)
Returns the y-coordinate of the given candidate. |
void |
reset()
Resets each cell that appears on the thread. |
void |
reset(int move)
Resets each cell that appears on the thread after the given move. |
void |
selectCandidate()
Selects a single candidate from the available list. |
void |
setCandidate()
Sets the value chosen by findCandidates(). |
java.lang.String |
toString()
Dumps the thread to the given output stream. |
boolean |
unwind(int newNMoves,
boolean reset)
Unwinds the the thread and reinstates state variables. |
void |
updateState(int x,
int y,
int value,
java.lang.String reason,
boolean writeState)
Updates state variables. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void selectCandidate()
public void setCandidate()
IStrategy.setCandidate()
public void updateState(int x, int y, int value, java.lang.String reason, boolean writeState) throws java.lang.Exception
java.lang.Exception
IStrategy.updateState(int,int,int,String,boolean)
public boolean unwind(int newNMoves, boolean reset)
IStrategy.unwind(int,boolean)
public void reset()
IStrategy.reset()
public void reset(int move)
IStrategy.reset(int)
public int getBestX()
IStrategy.getBestX()
public int getBestY()
IStrategy.getBestY()
public int getBestValue()
IStrategy.getBestValue()
public java.lang.String getBestReason()
IStrategy.getBestReason()
public int getXCandidate(int index)
public int getYCandidate(int index)
public int getValueCandidate(int index)
public java.lang.String getReasonCandidate(int index)
public int getNumberOfCandidates()
public int getThreadLength()
IStrategy.getThreadLength()
public int getThreadX(int move)
IStrategy.getThreadX(int)
public int getThreadY(int move)
IStrategy.getThreadY(int)
public java.lang.String getReason(int move)
IStrategy.getReason(int)
public boolean explainsReasoning()
public int getScore()
IStrategy.getScore()
public int getLastWrittenMove()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |