-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSokoban.ctxt
64 lines (64 loc) · 4.1 KB
/
Sokoban.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#BlueJ class context
comment0.target=Sokoban
comment0.text=\r\n\ A\ Sokoban\ puzzle.\r\n\ \r\n\ @author\ Dr\ Mark\ C.\ Sinclair\r\n\ @version\ September\ 2021\r\n\r\n
comment1.params=file
comment1.target=Sokoban(java.io.File)
comment1.text=\r\n\ Construct\ a\ Sokoban\ puzzle\ from\ a\ standard\ Sokoban\ screen\ file\r\n\ \r\n\ @param\ file\ the\ file\r\n
comment10.params=
comment10.target=int\ numBoxes()
comment10.text=\r\n\ Count\ the\ number\ of\ boxes\ in\ the\ Sokoban\ puzzle\r\n\ \r\n\ @return\ the\ number\ of\ boxes\r\n
comment11.params=
comment11.target=int\ numActors()
comment11.text=\r\n\ Count\ the\ number\ of\ actors\ in\ the\ Sokoban\ puzzle\ (should\ be\ one)\r\n\ \r\n\ @return\ the\ number\ of\ actors\r\n
comment12.params=
comment12.target=int\ numOnTarget()
comment12.text=\r\n\ Count\ the\ number\ of\ boxes\ on\ target\ cells\ in\ the\ Sokoban\ puzzle\r\n\ \r\n\ @return\ the\ number\ of\ boxes\ on\ target\ cells\r\n
comment13.params=
comment13.target=boolean\ onTarget()
comment13.text=\r\n\ Are\ all\ the\ boxes\ on\ target\ in\ the\ Sokoban\ puzzle?\r\n\ \r\n\ @return\ are\ all\ the\ boxes\ on\ target?\r\n
comment14.params=dir
comment14.target=boolean\ canMove(Direction)
comment14.text=\r\n\ Checks\ if\ the\ actor\ can\ move\ to\ the\ next\ cell\ in\ a\ given\ direction\r\n\ \r\n\ @param\ dir\ the\ direction\ to\ check\r\n\ @return\ can\ the\ actor\ move\ to\ the\ next\ cell\ in\ a\ given\ direction?\r\n
comment15.params=
comment15.target=java.util.Vector\ canMove()
comment15.text=\r\n\ In\ which\ directions\ can\ the\ actor\ move?\r\n\ \r\n\ @return\ a\ vector\ of\ available\ directions\r\n
comment16.params=dir
comment16.target=void\ move(Direction)
comment16.text=\r\n\ If\ it\ is\ safe,\ move\ the\ actor\ to\ the\ next\ cell\ in\ a\ given\ direction\r\n\ \r\n\ @param\ dir\ the\ direction\ to\ move\r\n
comment17.params=
comment17.target=java.lang.String\ toString()
comment17.text=\r\n\ A\ String\ representation\ of\ the\ Sokoban\ puzzle\r\n\ \r\n\ @return\ the\ String\ representation\r\n
comment18.params=c
comment18.target=boolean\ validDisplay(char)
comment18.text=\r\n\ Check\ if\ this\ is\ a\ valid\ display\ character\ for\ a\ Sokoban\ puzzle?\r\n\ \r\n\ @param\ c\ the\ character\ to\ check\r\n\ @param\ is\ this\ a\ valid\ display\ character?\r\n
comment19.params=file
comment19.target=java.lang.String\ fileAsString(java.io.File)
comment19.text=\r\n\ Convert\ a\ file\ into\ a\ String\r\n\ \r\n\ @param\ file\ the\ file\r\n\ @return\ the\ file\ as\ a\ string\r\n
comment2.params=screen
comment2.target=Sokoban(java.lang.String)
comment2.text=\r\n\ Construct\ a\ Sokoban\ puzzle\ from\ a\ standard\ Sokoban\ screen\ file\ passed\ as\ a\ String\r\n\ \r\n\ @param\ screen\ the\ screen\ file\ as\ a\ String\r\n
comment20.params=s
comment20.target=void\ trace(java.lang.String)
comment20.text=\r\n\ A\ trace\ method\ for\ debugging\ (active\ when\ traceOn\ is\ true)\r\n\ \r\n\ @param\ s\ the\ string\ to\ output\r\n
comment3.params=
comment3.target=void\ checkValid()
comment3.text=\r\n\ Some\ basic\ validity\ checks\r\n
comment4.params=
comment4.target=void\ clear()
comment4.text=\r\n\ Reset\ to\ the\ starting\ state\r\n
comment5.params=
comment5.target=int\ getNumRows()
comment5.text=\r\n\ Gets\ the\ number\ of\ cell\ rows\r\n\ \r\n\ @return\ the\ number\ of\ cell\ rows\r\n
comment6.params=
comment6.target=int\ getNumCols()
comment6.text=\r\n\ Gets\ the\ number\ of\ cell\ columns\r\n\ \r\n\ @return\ the\ number\ of\ cell\ columns\r\n
comment7.params=row\ col
comment7.target=Cell\ getCell(int,\ int)
comment7.text=\r\n\ Get\ a\ cell\ from\ the\ Sokoban\ puzzle\r\n\ \r\n\ @param\ row\ row\ number\ (starts\ from\ 0)\r\n\ @param\ col\ column\ number\ (starts\ from\ 0)\r\n\ @return\ the\ requested\ cell\r\n
comment8.params=
comment8.target=Cell\ getActorCell()
comment8.text=\r\n\ Get\ the\ actor\ cell\ from\ the\ Sokoban\ puzzle\r\n\ \r\n\ @return\ the\ requested\ cell\r\n
comment9.params=
comment9.target=int\ numTargets()
comment9.text=\r\n\ Count\ the\ number\ of\ targets\ in\ the\ Sokoban\ puzzle\r\n\ \r\n\ @return\ the\ number\ of\ targets\r\n
numComments=21