org.eclipse.palamedes.gdl.core.model
Interface IGameTree

All Known Implementing Classes:
GameNodeTree

public interface IGameTree

The IGameTree interface provides a facade to work with a game state space representation.


Method Summary
 IGameNode addChild(IGameNode parent, IGameState child, IMove[] moves)
          Adds a new state to the tree and returns the new generated node.
 IGameNode getNextNode(IGameNode parent, IMove[] moves)
          Returns the child game node of a parent which was derived through moves.
 IGameNode getRootNode()
          Returns the root node of the game tree.
 void setTerminal(IGameState terminalState)
          Announces a terminal state.
 

Method Detail

addChild

IGameNode addChild(IGameNode parent,
                   IGameState child,
                   IMove[] moves)
Adds a new state to the tree and returns the new generated node. The moves that lead to it are attached to the new node as well.


getNextNode

IGameNode getNextNode(IGameNode parent,
                      IMove[] moves)
Returns the child game node of a parent which was derived through moves. If no such node exists the method should return null.


getRootNode

IGameNode getRootNode()
Returns the root node of the game tree. For each game tree a root node should exist.


setTerminal

void setTerminal(IGameState terminalState)
Announces a terminal state.