-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOccupant.ctxt
39 lines (39 loc) · 2.79 KB
/
Occupant.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
29
30
31
32
33
34
35
36
37
38
39
#BlueJ class context
comment0.target=Occupant
comment0.text=\r\n\ An\ abstract\ cell\ occupant\ in\ a\ Sokoban\ puzzle.\r\n\ \r\n\ @author\ Dr\ Mark\ C.\ Sinclair\r\n\ @version\ September\ 2021\r\n\ \r\n\ Student\ Name\:\ Mustafa\ Turgut\ Guvercin\r\n\ Student\ ID\:21034972\r\n
comment1.params=cell
comment1.target=Occupant(Cell)
comment10.params=
comment10.target=boolean\ onTarget()
comment10.text=\r\n\ Checks\ if\ this\ cell\ is\ a\ target\ occupied\ by\ a\ box\r\n\ (overridden\ by\ Box)\r\n\ \r\n\ @return\ false\r\n
comment11.params=
comment11.target=java.lang.String\ toString()
comment11.text=\r\n\ A\ String\ representation\ of\ the\ Occupant\r\n\ \r\n\ @return\ the\ String\ representation\r\n
comment12.params=display\ cell
comment12.target=Occupant\ getInstance(char,\ Cell)
comment12.text=\r\n\ A\ factory\ method\ to\ construct\ an\ Occupant\ based\ on\ the\ display\ character\ and\ cell\ to\ be\ occupied.\r\n\ The\ display\ character\ must\ be\ valid.\r\n\ \r\n\ @param\ display\ the\ display\ character\r\n\ @param\ cell\ the\ cell\ to\ be\ occupied\r\n
comment2.params=
comment2.target=boolean\ isActor()
comment2.text=\r\n\ Checks\ if\ this\ occupant\ is\ an\ actor\ (overridden\ by\ Actor)\r\n\ \r\n\ @return\ false\r\n
comment3.params=
comment3.target=boolean\ isBox()
comment3.text=\r\n\ Checks\ if\ this\ occupant\ is\ a\ box\ (overridden\ by\ Box)\r\n\ \r\n\ @return\ false\r\n
comment4.params=
comment4.target=boolean\ isWall()
comment4.text=\r\n\ Checks\ if\ this\ occupant\ is\ a\ wall\ (overridden\ by\ Wall)\r\n\ \r\n\ @return\ false\r\n
comment5.params=
comment5.target=char\ getDisplay()
comment5.text=\r\n\ Gets\ the\ character\ to\ use\ for\ display\ purposes\ for\ this\ cell\r\n\ \r\n\ @return\ character\ to\ use\ for\ display\ purposes\ for\ this\ cell\r\n
comment6.params=cell
comment6.target=void\ setCell(Cell)
comment6.text=\r\n\ Changes\ the\ cell\ for\ this\ occupant\r\n\ \r\n\ @param\ cell\ the\ cell\ occupied\ by\ this\ occupant\ (cannot\ be\ null)\r\n
comment7.params=dir
comment7.target=boolean\ isStuckSafe(Direction)
comment7.text=\r\n\ Check\ if\ this\ occupant\ is\ safe\ (from\ getting\ stuck\ to\ a\ box)\ if\ it\ moves\ in\ the\ given\ direction\r\n\ (overridden\ by\ Box)\r\n\ \r\n\ @param\ dir\ the\ direction\ to\ check\r\n\ @return\ false\r\n
comment8.params=dir
comment8.target=boolean\ canMove(Direction)
comment8.text=\r\n\ Checks\ if\ the\ occupant\ can\ move\ to\ the\ next\ cell\ in\ a\ given\ direction\r\n\ (overridden\ by\ Actor\ and\ Box)\r\n\ \r\n\ @param\ dir\ the\ direction\ to\ check\r\n\ @return\ false\r\n
comment9.params=dir
comment9.target=void\ move(Direction)
comment9.text=\r\n\ If\ it\ is\ safe,\ move\ the\ occupant\ to\ the\ next\ cell\ in\ a\ given\ direction\r\n\ \r\n\ @param\ dir\ the\ direction\ to\ move\r\n
numComments=13