|
||||||||||
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.GameNodeTree
public class GameNodeTree
The GameStateTree contains the tree of already resolved game nodes.
Field Summary | |
---|---|
java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>> |
gsHash2Nodes
Mapping: GameState.hashCode -> [GameNode.hashCode]+ |
java.util.HashMap<java.lang.Integer,IGameNode> |
hash2Node
Mapping: GameNode.hashCode -> GameNode |
static boolean |
jumpNode
|
java.util.HashMap<IGameNode,java.util.List<IGameNode>> |
structure
Mapping ParentNode -> [ChildNode]* |
Constructor Summary | |
---|---|
GameNodeTree()
This constructor creates an empty game state tree. |
Method Summary | |
---|---|
IGameNode |
addChild(IGameNode parent,
IGameState child,
IMove[] moves)
This method adds a child to a parent. |
protected void |
getBranchingInfo()
|
IGameNode |
getNextNode(IGameNode parent,
IMove[] moves)
Returns the child game node of a parent which was derived through moves. |
protected int |
getNumberOfStates()
|
IGameNode |
getRootNode()
Returns the root node of the game tree. |
void |
removeAllSiblingTrees(IGameNode node)
|
void |
setRoot(IGameState state)
|
void |
setTerminal(IGameState terminalState)
Announces a terminal state. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.util.HashMap<IGameNode,java.util.List<IGameNode>> structure
public final java.util.HashMap<java.lang.Integer,java.util.List<java.lang.Integer>> gsHash2Nodes
public final java.util.HashMap<java.lang.Integer,IGameNode> hash2Node
public static boolean jumpNode
Constructor Detail |
---|
public GameNodeTree()
Method Detail |
---|
public void setRoot(IGameState state)
public IGameNode addChild(IGameNode parent, IGameState child, IMove[] moves)
addChild
in interface IGameTree
parent
- child
- protected void getBranchingInfo()
protected final int getNumberOfStates()
public java.lang.String toString()
toString
in class java.lang.Object
public IGameNode getNextNode(IGameNode parent, IMove[] moves)
IGameTree
getNextNode
in interface IGameTree
public IGameNode getRootNode()
IGameTree
getRootNode
in interface IGameTree
public void setTerminal(IGameState terminalState)
IGameTree
setTerminal
in interface IGameTree
public void removeAllSiblingTrees(IGameNode node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |