|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.game.AbstractEnvironment
org.vizzini.game.arcadegame.AbstractArcadeEnvironment
org.vizzini.example.pong.Environment
public class Environment
Provides an environment for Pong.
| Constructor Summary | |
|---|---|
Environment()
Construct this object. |
|
| Method Summary | |
|---|---|
Ball |
getBall()
Return the ball. |
IAgent |
getLeftAgent()
Return the left agent. |
Paddle |
getLeftPaddle()
Return the left paddle. |
Paddle |
getPaddle(IAgent agent)
Return the paddle which belongs to the given agent. |
IAgent |
getRightAgent()
Return the right agent. |
Paddle |
getRightPaddle()
Return the right paddle. |
protected void |
newBall()
Start a new ball. |
void |
performAction(IAction action0)
Perform the given action. |
void |
reset()
Reset to the initial state. |
void |
undoAction(IAction action)
Undo the given action. |
void |
update(long deltaTime)
Update the environment for the given elapsed time. |
| Methods inherited from class org.vizzini.game.arcadegame.AbstractArcadeEnvironment |
|---|
configure, getDimension, setDimension, setDimension |
| Methods inherited from class org.vizzini.game.AbstractEnvironment |
|---|
addStateListener, clone, copy, createInitialTokens, equals, get, getAdjudicator, getAgentCollection, getStateManager, getTeamCollection, getTokenCollection, getTokenCollectionClass, getTurnNumber, hashCode, incrementTurnNumber, isFiringStateChanges, open, performActions, removeStateListener, setAdjudicator, setAgentCollection, setFiringStateChanges, setTokenCollectionClass, setTurnNumber |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.vizzini.game.IEnvironment |
|---|
addStateListener, clone, copy, get, getAdjudicator, getAgentCollection, getTeamCollection, getTokenCollection, getTurnNumber, incrementTurnNumber, isFiringStateChanges, open, performActions, removeStateListener, setAdjudicator, setAgentCollection, setFiringStateChanges, setTurnNumber |
| Constructor Detail |
|---|
public Environment()
| Method Detail |
|---|
public Ball getBall()
public IAgent getLeftAgent()
public Paddle getLeftPaddle()
public Paddle getPaddle(IAgent agent)
public IAgent getRightAgent()
public Paddle getRightPaddle()
public void performAction(IAction action0)
action0 - Action.public void reset()
reset in interface IEnvironmentreset in class AbstractEnvironmentpublic void undoAction(IAction action)
undoAction in interface IEnvironmentundoAction in class AbstractArcadeEnvironmentaction - Action.public void update(long deltaTime)
update in interface IEnvironmentupdate in class AbstractEnvironmentdeltaTime - Delta time per cycle. (ms)protected void newBall()
|
||||||||||
| 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 |