|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGame
The IGame interface follows the facade design pattern. It hides the game information storage, the game analysis, the reasoning machinery and the game state space representation.
Method Summary | |
---|---|
java.util.List<IMove[]> |
getCombinedMoves(IGameNode currentNode)
Returns a list of all moves combined. |
int[] |
getGoalValues(IGameNode currentNode)
Returns an array of the goal values of all players. |
GDLKnowledgeBase |
getKnowledgeBase()
Returns the knowledge base that is used for this game. |
IMove[][] |
getLegalMoves(IGameNode currentNode)
Returns an array of the legal moves of each player. |
int |
getMaxSteps()
Returns the maximum number of steps if this information is known from the rules; otherwise -1; |
IGameNode |
getNextNode(IGameNode currentNode,
IMove[] moves)
Returns the child node of the parent that is connected through the specified moves. |
int |
getPerftValue(int n,
IGameNode startNode)
Returns the perft(n) value starting from the given startNode. |
IMove[] |
getRandomMove(IGameNode currentNode)
Returns a random combined move. |
IReasoner |
getReasoner()
Returns the reasoner that is used for this game. |
int |
getRoleCount()
Returns the number of roles respective the number of players. |
int |
getRoleIndex(java.lang.String role)
Returns the index of the given role in the role name array. |
java.lang.String[] |
getRoleNames()
Returns the string representation of the role names as string array. |
java.lang.String |
getSourceGDL()
Returns the original GDL description for this game. |
IGameState |
getState(IGameNode currentNode)
Returns the game state associated with currentNode. |
IStatistic |
getStatistic()
|
IGameTree |
getTree()
Returns the game tree representation if it exists; otherwise null. |
void |
init(java.lang.String gdl)
Initialises a game object. |
boolean |
isTerminal(IGameNode currentNode)
Returns true if the state of the node is a terminal state |
void |
regenerateNode(IGameNode node)
This method regenerates the game states if the game node lost its state information for one reason or another. |
Method Detail |
---|
java.lang.String getSourceGDL()
java.lang.String[] getRoleNames()
int getRoleCount()
int getRoleIndex(java.lang.String role)
IGameTree getTree()
IReasoner getReasoner()
GDLKnowledgeBase getKnowledgeBase()
java.util.List<IMove[]> getCombinedMoves(IGameNode currentNode) throws java.lang.InterruptedException
java.lang.InterruptedException
IMove[][] getLegalMoves(IGameNode currentNode) throws java.lang.InterruptedException
java.lang.InterruptedException
IMove[] getRandomMove(IGameNode currentNode) throws java.lang.InterruptedException
java.lang.InterruptedException
IGameNode getNextNode(IGameNode currentNode, IMove[] moves) throws java.lang.InterruptedException
java.lang.InterruptedException
boolean isTerminal(IGameNode currentNode) throws java.lang.InterruptedException
currentNode
-
java.lang.InterruptedException
int[] getGoalValues(IGameNode currentNode) throws java.lang.InterruptedException
java.lang.InterruptedException
IGameState getState(IGameNode currentNode) throws java.lang.InterruptedException
java.lang.InterruptedException
regenerateNode(IGameNode node)
void regenerateNode(IGameNode node) throws java.lang.InterruptedException
java.lang.InterruptedException
int getMaxSteps()
IStatistic getStatistic()
int getPerftValue(int n, IGameNode startNode) throws java.lang.InterruptedException
java.lang.InterruptedException
void init(java.lang.String gdl)
gdl
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |