Class WDSimulation
java.lang.Object
Simulation
WDSimulation
public class WDSimulation
- extends Simulation
A wolf and deer simulation that extends the Simulation class
- Author:
- Mark Guzdial, Barb Ericon
Method Summary |
static void |
main(String[] args)
Main for testing |
void |
setUp()
Fill the world with wolves and deer |
String |
toString()
return a string with the number of deer and the
number of wolves |
Methods inherited from class Simulation |
add, closeFile, endStep, getAgents, getOutput, getWorld, openFile, openFrames, remove, run, run |
WDSimulation
public WDSimulation()
setUp
public void setUp()
- Fill the world with wolves and deer
- Overrides:
setUp
in class Simulation
toString
public String toString()
- return a string with the number of deer and the
number of wolves
- Overrides:
toString
in class Simulation
- Returns:
- the information string
main
public static void main(String[] args)
- Main for testing