-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlant.ctxt
22 lines (22 loc) · 1.8 KB
/
Plant.ctxt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#BlueJ class context
comment0.target=Plant
comment0.text=\r\n\ A\ simple\ model\ of\ a\ Plant.\r\n\ Plants\ age,\ move,\ breed,\ and\ die.\r\n\ \r\n\ @author\ David\ J.\ Barnes\ and\ Michael\ K\u00F6lling\r\n\ @version\ 2016.02.29\ (2)\r\n
comment1.params=randomAge\ field\ location
comment1.target=Plant(boolean,\ Field,\ Location)
comment1.text=\r\n\ Create\ a\ new\ Plant.\ A\ Plant\ may\ be\ created\ with\ age\r\n\ zero\ (a\ new\ born)\ or\ with\ a\ random\ age.\r\n\ \r\n\ @param\ randomAge\ If\ true,\ the\ Plant\ will\ have\ a\ random\ age.\r\n\ @param\ field\ The\ field\ currently\ occupied.\r\n\ @param\ location\ The\ location\ within\ the\ field.\r\n
comment2.params=newPlants
comment2.target=void\ act(java.util.List)
comment2.text=\r\n\ This\ is\ what\ the\ Plant\ does\ most\ of\ the\ time\ -\ it\ runs\ \r\n\ around.\ Sometimes\ it\ will\ breed\ or\ die\ of\ old\ age.\r\n\ @param\ newPlants\ A\ list\ to\ return\ newly\ born\ Plants.\r\n
comment3.params=
comment3.target=void\ incrementAge()
comment3.text=\r\n\ Increase\ the\ age.\r\n\ This\ could\ result\ in\ the\ Plant's\ death.\r\n
comment4.params=newPlants
comment4.target=void\ giveBirth(java.util.List)
comment4.text=\r\n\ Check\ whether\ or\ not\ this\ Plant\ is\ to\ give\ birth\ at\ this\ step.\r\n\ New\ births\ will\ be\ made\ into\ free\ adjacent\ locations.\r\n\ @param\ newPlants\ A\ list\ to\ return\ newly\ born\ Plants.\r\n
comment5.params=
comment5.target=int\ breed()
comment5.text=\r\n\ Generate\ a\ number\ representing\ the\ number\ of\ births,\r\n\ if\ it\ can\ breed.\r\n\ @return\ The\ number\ of\ births\ (may\ be\ zero).\r\n
comment6.params=
comment6.target=boolean\ canBreed()
comment6.text=\r\n\ A\ Plant\ can\ breed\ if\ it\ has\ reached\ the\ breeding\ age.\r\n\ @return\ true\ if\ the\ Plant\ can\ breed,\ false\ otherwise.\r\n
numComments=7