|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.palamedes.gdl.core.model.utils.GameNode
public final class GameNode
Constructor Summary | |
---|---|
GameNode()
|
|
GameNode(IGameNode parent,
IGameState state,
IMove[] moves)
|
Method Summary | |
---|---|
int |
getDepth()
Returns the depth of the node in the game tree where 0 is the initial state. |
static java.util.List<IFluent>[] |
getDiff(IGameState nodeA,
IGameState nodeB)
|
static int[] |
getDiffCount(IGameState nodeA,
IGameState nodeB)
|
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 |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GameNode()
public GameNode(IGameNode parent, IGameState state, IMove[] moves)
Method Detail |
---|
public IGameNode getParent()
IGameNode
getParent
in interface IGameNode
public int getDepth()
IGameNode
getDepth
in interface IGameNode
public IGameState getState()
IGameNode
getState
in interface IGameNode
IGameNode.isPreserved()
,
IGameNode.setPreserve(boolean preserve)
,
IGame.regenerateNode(IGameNode node)
public void setState(IGameState state)
IGameNode
setState
in interface IGameNode
public IMove[] getMoves()
IGameNode
getMoves
in interface IGameNode
public boolean isPreserved()
IGameNode
isPreserved
in interface IGameNode
public void setPreserve(boolean preserve)
IGameNode
setPreserve
in interface IGameNode
public java.lang.String toString()
toString
in class java.lang.Object
public static int[] getDiffCount(IGameState nodeA, IGameState nodeB)
public static java.util.List<IFluent>[] getDiff(IGameState nodeA, IGameState nodeB)
public boolean isTerminal()
IGameNode
isTerminal
in interface IGameNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |