-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoar.ctxt
28 lines (28 loc) · 1.94 KB
/
Boar.ctxt
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=Boar
comment0.text=\r\n\ A\ simple\ model\ of\ a\ Boar.\r\n\ Boars\ 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=Boar(boolean,\ Field,\ Location)
comment1.text=\r\n\ Create\ a\ new\ Boar.\ A\ Boar\ 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\ Boar\ 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=newBoars
comment2.target=void\ act(java.util.List)
comment2.text=\r\n\ This\ is\ what\ the\ Boar\ does\ most\ of\ the\ time\ -\ it\ runs\ \r\n\ around.\ Sometimes\ it\ will\ breed\ or\ die\ of\ old\ age.\r\n\ @param\ newBoars\ A\ list\ to\ return\ newly\ born\ Boars.\r\n
comment3.params=
comment3.target=void\ incrementAge()
comment3.text=\r\n\ Increase\ the\ age.\r\n\ This\ could\ result\ in\ the\ Boar's\ death.\r\n
comment4.params=newBoars
comment4.target=void\ giveBirth(java.util.List)
comment4.text=\r\n\ Check\ whether\ or\ not\ this\ Boar\ is\ to\ give\ birth\ at\ this\ step.\r\n\ New\ births\ will\ be\ made\ into\ free\ adjacent\ locations.\r\n\ @param\ newBoars\ A\ list\ to\ return\ newly\ born\ Boars.\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\ Boar\ can\ breed\ if\ it\ has\ reached\ the\ breeding\ age.\r\n\ @return\ true\ if\ the\ Boar\ can\ breed,\ false\ otherwise.\r\n
comment7.params=
comment7.target=boolean\ getGender()
comment8.params=
comment8.target=Location\ findFood()
comment9.params=
comment9.target=int\ getAge()
numComments=10