|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGameNode
A game node is a unique instance of a game state within a game node tree. Usually this interface is only implemented if you provide an own game tree implementation.
Method Summary | |
---|---|
int |
getDepth()
Returns the depth of the node in the game tree where 0 is the initial state. |
IMove[] |
getMoves()
Returns the moves that have lead to this game node. |
IGameNode |
getParent()
Returns the parent node or null if none exist. |
IGameState |
getState()
Returns the associated game state if it is still in memory. |
boolean |
isPreserved()
Returns if this game nodes content should be preserved even in the case of compacting the game tree. |
boolean |
isTerminal()
Returns whether this node is a terminal node or not. |
void |
setPreserve(boolean preserve)
Sets whether this game nodes content should be preserved even in the case of compacting the game tree. |
void |
setState(IGameState state)
Sets the associated game state |
Method Detail |
---|
IGameNode getParent()
IGameState getState()
isPreserved()
,
setPreserve(boolean preserve)
,
IGame.regenerateNode(IGameNode node)
void setState(IGameState state)
int getDepth()
IMove[] getMoves()
boolean isPreserved()
void setPreserve(boolean preserve)
boolean isTerminal()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |