|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IGameState
IGameState provides an interface for general interaction with a single game state. Usually it is a Wrapper around a state object which was given by the games reasoner. AbstractState provides some basic functionality for such a wrapper.
AbstractState
Method Summary | |
---|---|
java.util.List<IMove[]> |
getCombinedLegalMoves()
Returns the combined legal moves. |
java.util.List<IFluent> |
getFluentByName(java.lang.String name)
Returns the fluents with the given name. |
java.util.List<java.lang.String> |
getFluentNames()
Returns the fluents with the given name. |
java.util.List<IFluent> |
getFluents()
Returns a list containing all fluents of the game state. |
int |
getGoalValue(int roleIndex)
Returns the goal value for the player specified by roleIndex of the state if the state is a goal state; otherwise -1. |
int[] |
getGoalValues()
Returns the goal values in the same order as IGame.getRoleNames() |
IMove[][] |
getLegalMoves()
Returns an array of the legal moves of each player. |
java.lang.Object |
getNativeState()
Returns the state object that was provided by the reasoner. |
boolean |
isTerminal()
Returns true if the state is a terminal state; otherwise false. |
void |
setGoalValues(int[] goalValues)
Sets the goal value of the game state. |
void |
setLegalMoves(IMove[][] moves)
Sets the legal moves for this game state. |
void |
setTerminal()
Sets the terminal flag of the state. |
Method Detail |
---|
java.util.List<IMove[]> getCombinedLegalMoves()
IMove[][] getLegalMoves()
int getGoalValue(int roleIndex)
int[] getGoalValues()
IGame.getRoleNames()
boolean isTerminal()
void setGoalValues(int[] goalValues)
void setTerminal()
void setLegalMoves(IMove[][] moves)
java.util.List<java.lang.String> getFluentNames()
java.util.List<IFluent> getFluentByName(java.lang.String name)
java.util.List<IFluent> getFluents()
java.lang.Object getNativeState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |