Repository navigation
Expand file tree
/
Copy pathSimulator.ctxt
More file actions
28 lines (28 loc) · 1.87 KB
/
Copy pathSimulator.ctxt
File metadata and controls
28 lines (28 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#BlueJ class context
comment0.target=Simulator
comment0.text=\r\n\ A\ simple\ predator-prey\ simulator,\ based\ on\ a\ rectangular\ field\r\n\ containing\ rabbits\ and\ foxes.\r\n\ \r\n\ @author\ David\ J.\ Barnes\ and\ Michael\ K\u00F6lling\r\n\ @version\ 2016.02.29\ (2)\r\n
comment1.params=
comment1.target=Simulator()
comment1.text=\r\n\ Construct\ a\ simulation\ field\ with\ default\ size.\r\n
comment2.params=depth\ width
comment2.target=Simulator(int,\ int)
comment2.text=\r\n\ Create\ a\ simulation\ field\ with\ the\ given\ size.\r\n\ @param\ depth\ Depth\ of\ the\ field.\ Must\ be\ greater\ than\ zero.\r\n\ @param\ width\ Width\ of\ the\ field.\ Must\ be\ greater\ than\ zero.\r\n
comment3.params=
comment3.target=void\ runLongSimulation()
comment3.text=\r\n\ Run\ the\ simulation\ from\ its\ current\ state\ for\ a\ reasonably\ long\ period,\r\n\ (4000\ steps).\r\n
comment4.params=numSteps
comment4.target=void\ simulate(int)
comment4.text=\r\n\ Run\ the\ simulation\ from\ its\ current\ state\ for\ the\ given\ number\ of\ steps.\r\n\ Stop\ before\ the\ given\ number\ of\ steps\ if\ it\ ceases\ to\ be\ viable.\r\n\ @param\ numSteps\ The\ number\ of\ steps\ to\ run\ for.\r\n
comment5.params=
comment5.target=void\ simulateOneStep()
comment5.text=\r\n\ Run\ the\ simulation\ from\ its\ current\ state\ for\ a\ single\ step.\r\n\ Iterate\ over\ the\ whole\ field\ updating\ the\ state\ of\ each\r\n\ fox\ and\ rabbit.\r\n
comment6.params=
comment6.target=void\ reset()
comment6.text=\r\n\ Reset\ the\ simulation\ to\ a\ starting\ position.\r\n
comment7.params=
comment7.target=void\ populate()
comment7.text=\r\n\ Randomly\ populate\ the\ field\ with\ foxes\ and\ rabbits.\r\n
comment8.params=millisec
comment8.target=void\ delay(int)
comment8.text=\r\n\ Pause\ for\ a\ given\ time.\r\n\ @param\ millisec\ \ The\ time\ to\ pause\ for,\ in\ milliseconds\r\n
numComments=9