|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.game.AbstractAdjudicator
public abstract class AbstractAdjudicator
Provides base functionality for 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.
| Field Summary | |
|---|---|
protected IAgent |
_winner
The winning agent. |
| Constructor Summary | |
|---|---|
AbstractAdjudicator()
Construct this object. |
|
| 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. |
void |
reset()
Reset to the initial state. |
void |
setWinner(IAgent agent)
Set the winning agent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.vizzini.game.IAdjudicator |
|---|
isActionLegal, isGameOver, isGoal |
| Field Detail |
|---|
protected IAgent _winner
| Constructor Detail |
|---|
public AbstractAdjudicator()
| Method Detail |
|---|
public boolean areActionsLegal(IEnvironment environment,
ActionCollection actions)
areActionsLegal in interface IAdjudicatorenvironment - The current environment.actions - List of actions to evaluate.public IAgent getWinner()
getWinner in interface IAdjudicatorpublic void reset()
reset in interface IAdjudicatorpublic void setWinner(IAgent agent)
setWinner in interface IAdjudicator
|
||||||||||
| 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 |