|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAdjudicator
Defines methods required by adjudicators in the game framework. An adjudicator instance encapsulates the rules of a game by determining the legality of actions and when the game is over.
Method Summary | |
---|---|
boolean |
areActionsLegal(IEnvironment environment,
ActionCollection actions)
Return true if the actions in the given list are legal in the given environment. |
IAgent |
getWinner()
Return the winning agent, or null if there is no winner. |
boolean |
isActionLegal(IEnvironment environment,
IAction action)
Return true if the given action is legal in the given environment. |
boolean |
isGameOver(IEnvironment environment)
Return true if the given environment represents a completed game. |
boolean |
isGoal(IEnvironment environment)
Return true if one of the agents has won. |
void |
reset()
Reset to the initial state. |
void |
setWinner(IAgent agent)
Set the winning agent. |
Method Detail |
---|
boolean areActionsLegal(IEnvironment environment, ActionCollection actions)
environment
- The current environment.actions
- List of actions to evaluate.IAgent getWinner()
boolean isActionLegal(IEnvironment environment, IAction action)
environment
- The current environment.
boolean isGameOver(IEnvironment environment)
environment
- The current environment.boolean isGoal(IEnvironment environment)
void reset()
void setWinner(IAgent agent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |