Class DSAgent
java.lang.Object
SimpleTurtle
Turtle
Agent
DSAgent
public class DSAgent
- extends Agent
A discrete event agent
A DSAgent doesn't act().
A DSAgent adds events to the queue, and requests resources.
- Author:
- Mark Guzdial, Barb Ericson
Constructor Summary |
DSAgent(int x,
int y,
ModelDisplay modelDisplayer,
Simulation thisSim)
Constructor that takes the x and y, a model
display to draw it on, and the simulation |
DSAgent(ModelDisplay modelDisplayer,
Simulation thisSim)
Constructor that takes the model display (the original
position will be randomly assigned) and the simulation |
Method Summary |
void |
init(Simulation thisSim)
Method to initialize the simulation |
Methods inherited from class SimpleTurtle |
backward, backward, clearPath, drawInfoString, drop, forward, forward, getBodyColor, getDistance, getHeading, getHeight, getInfoColor, getModelDisplay, getName, getPen, getPenColor, getPenWidth, getShellColor, getShowInfo, getWidth, getXPos, getYPos, hide, isPenDown, isVisible, moveTo, paintComponent, penDown, penUp, setBodyColor, setColor, setHeading, setHeight, setInfoColor, setModelDisplay, setName, setPen, setPenColor, setPenDown, setPenWidth, setShellColor, setShowInfo, setVisible, setWidth, show, toString, turn, turnLeft, turnRight, turnToFace, turnToFace, updateDisplay |
DSAgent
public DSAgent(ModelDisplay modelDisplayer,
Simulation thisSim)
- Constructor that takes the model display (the original
position will be randomly assigned) and the simulation
- Parameters:
modelDisplayer
- thing that displays the modelthisSim
- my simulation
DSAgent
public DSAgent(int x,
int y,
ModelDisplay modelDisplayer,
Simulation thisSim)
- Constructor that takes the x and y, a model
display to draw it on, and the simulation
- Parameters:
x
- the starting x positiony
- the starting y positionmodelDisplayer
- the thing that displays the modelthisSim
- my simulation
init
public void init(Simulation thisSim)
- Method to initialize the simulation
- Overrides:
init
in class Agent
- Parameters:
thisSim
- the simulation