Class BirdSimulation
java.lang.Object
Simulation
BirdSimulation
public class BirdSimulation
- extends Simulation
BirdSimulation
A flock of 10 birds investigate a mysterious egg,
which suddenly shows itself to be a monster!
- Author:
- Mark Guzdial, Barb Ericson
Method Summary |
void |
endStep(int t)
What to do at the last time step
t the current timestep |
EggAgent |
getEgg()
Method to return the egg |
void |
setUp()
Set up the world with 10 birds and the mysterious egg |
Methods inherited from class Simulation |
add, closeFile, getAgents, getOutput, getWorld, openFile, openFrames, remove, run, run, toString |
BirdSimulation
public BirdSimulation()
setUp
public void setUp()
- Set up the world with 10 birds and the mysterious egg
- Overrides:
setUp
in class Simulation
getEgg
public EggAgent getEgg()
- Method to return the egg
- Returns:
- the egg
endStep
public void endStep(int t)
- What to do at the last time step
t the current timestep
- Overrides:
endStep
in class Simulation
- Parameters:
t
- the current timestep number