|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEnvironment
Defines methods required by environments in the game framework. An environment instance encapsulates the environment in which actions occur in a game, and tracks the effects of those actions. Examples of environments include a chess board, a card table, or deep space.
Method Summary | |
---|---|
void |
addStateListener(IStateListener listener)
Add the given listener. |
Object |
clone()
Return a clone of this instance. |
void |
configure(Properties properties)
Configure this environment. |
void |
copy(IEnvironment environment)
Copy data from the given instance into this. |
IToken |
get(IPosition position)
Return the token at the given position. |
IAdjudicator |
getAdjudicator()
Return the adjudicator. |
IAgentCollection |
getAgentCollection()
Return the agent collection. |
ITeamCollection |
getTeamCollection()
Return the team collection. |
ITokenCollection |
getTokenCollection()
Return the token collection. |
long |
getTurnNumber()
Return the current turn number. |
void |
incrementTurnNumber()
Increment the turn number. |
boolean |
isFiringStateChanges()
Return true if this is set to fire state change events. |
void |
open(IGameState gameState)
Open the game contained in the given game state. |
void |
performAction(IAction action)
Perform the given action. |
void |
performActions(Collection actions)
Perform the actions in the given list. |
void |
removeStateListener(IStateListener listener)
Remove the given listener. |
void |
reset()
Reset to the initial state. |
void |
setAdjudicator(IAdjudicator adjudicator)
Set the adjudicator. |
void |
setAgentCollection(IAgentCollection agentCollection)
Set the agent collection. |
void |
setFiringStateChanges(boolean fire)
Set the flag which indicates whether to fire state change events. |
void |
setTurnNumber(long turnNumber)
Set the turn number to the given value. |
void |
undoAction(IAction action)
Undo the given action. |
void |
update(long deltaTime)
Update the environment for the given elapsed time. |
Method Detail |
---|
void addStateListener(IStateListener listener)
Object clone()
void configure(Properties properties) throws InstantiationException, IllegalAccessException
properties
- Source of configuration information.
InstantiationException
IllegalAccessException
void copy(IEnvironment environment)
environment
- Environment from which to copy data.IToken get(IPosition position)
IAdjudicator getAdjudicator()
IAgentCollection getAgentCollection()
ITeamCollection getTeamCollection()
ITokenCollection getTokenCollection()
long getTurnNumber()
void incrementTurnNumber()
boolean isFiringStateChanges()
void open(IGameState gameState)
void performAction(IAction action)
action
- Action.void performActions(Collection actions)
actions
- List of actions.void removeStateListener(IStateListener listener)
void reset()
void setAdjudicator(IAdjudicator adjudicator)
adjudicator
- The new adjudicator.void setAgentCollection(IAgentCollection agentCollection)
agentCollection
- New agent collection.void setFiringStateChanges(boolean fire)
void setTurnNumber(long turnNumber)
void undoAction(IAction action)
action
- Action.void update(long deltaTime)
deltaTime
- Delta time per cycle. (ms)
|
||||||||||
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 |