-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.ctxt
executable file
·121 lines (121 loc) · 9.11 KB
/
Game.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#BlueJ class context
comment0.target=Game
comment0.text=\ \r\n\ \ This\ class\ is\ the\ main\ class\ of\ the\ "Underground\ Base\ Escape"\ application.\ \r\n\ \ \r\n\ \ This\ main\ class\ creates\ and\ initialises\ all\ the\ others\:\ it\ creates\ all\r\n\ \ rooms,\ items,\ characters,\ creates\ the\ parser\ and\ starts\ the\ game.\ It\ also\ \r\n\ \ evaluates\ and\ executes\ the\ commands\ that\ the\ parser\ returns.\r\n\ \r\n\ \ @author\ \ Michael\ K\u00F6lling,\ David\ J.\ Barnes\ and\ Yichun\ Zhang\r\n\ \ @version\ 2016.02.29\r\n
comment1.params=
comment1.target=Game()
comment1.text=\r\n\ Create\ the\ game\ and\ initialise\ its\ internal\ map.\r\n
comment10.params=
comment10.target=void\ getRemainTime()
comment10.text=\ \r\n\ "checkRemainTime"\ was\ entered.\ \r\n\ Print\ out\ the\ remaining\ time.\r\n
comment11.params=
comment11.target=void\ showWeight()
comment11.text=\ \r\n\ "currentWeight"\ was\ entered.\ \r\n\ Print\ out\ total\ weight\ of\ items\ player\ carry\ with.\r\n
comment12.params=
comment12.target=void\ showCarriedItems()
comment12.text=\ \r\n\ "myItems"\ was\ entered.\ \r\n\ Print\ out\ all\ the\ items\ player\ carry\ with.\r\n
comment13.params=
comment13.target=void\ backLastRoom()
comment13.text=\ \r\n\ "back"\ was\ entered.\ \r\n\ Take\ player\ back\ to\ the\ last\ room\ he\ has\ been\ in\r\n
comment14.params=command
comment14.target=boolean\ goRoom(Command)
comment14.text=\ \r\n\ "go"\ was\ entered.\r\n\ go\ +\ direction\r\n\ Try\ to\ in\ to\ one\ direction\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ true,\ if\ this\ command\ quits\ the\ game,\ false\ otherwise.\r\n
comment15.params=command
comment15.target=void\ pickUp(Command)
comment15.text=\ \r\n\ "pickup"\ was\ entered.\r\n\ pickup\ +\ itemName\r\n\ Try\ to\ pick\ up\ a\ item\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment16.params=command
comment16.target=void\ throwItem(Command)
comment16.text=\ \r\n\ "throw"\ was\ entered.\r\n\ throw\ +\ itemName\r\n\ Try\ to\ throw\ away\ a\ item\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment17.params=command
comment17.target=void\ showItemDescription(Command)
comment17.text=\ \r\n\ "check"\ was\ entered.\r\n\ check\ +\ itemName\r\n\ Get\ detailed\ information\ of\ this\ item\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment18.params=command
comment18.target=void\ killCharacter(Command)
comment18.text=\ \r\n\ "kill"\ was\ entered.\r\n\ kill\ +\ characterName\r\n\ Kill\ the\ character\ that\ can\ be\ killed\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment19.params=command
comment19.target=void\ openLockedRoom(Command)
comment19.text=\ \r\n\ "open"\ was\ entered.\r\n\ open\ +\ roomName\ +\ itemName\r\n\ Try\ to\ open\ the\ locked\ room\ by\ using\ this\ item\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment2.params=
comment2.target=void\ initialiseGame()
comment2.text=\r\n\ Create\ all\ the\ rooms,\ items\ and\ characters.\r\n\ Link\ rooms\ with\ their\ corresponding\ exits,\ items,\ characters\ together.\r\n
comment20.params=command
comment20.target=boolean\ isTwoWord(Command)
comment20.text=\ \r\n\ Whether\ the\ command\ is\ two\ words\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ true,\ if\ this\ command\ is\ two\ words,\ false\ otherwise.\r\n
comment21.params=command
comment21.target=boolean\ isThreeWord(Command)
comment21.text=\ \r\n\ Whether\ the\ command\ is\ three\ words\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ true,\ if\ this\ command\ is\ three\ words,\ false\ otherwise.\r\n
comment22.params=itemName
comment22.target=Item\ itemname2item(java.lang.String)
comment22.text=\ \r\n\ Convert\ item\ name\ to\ item\r\n\ @param\ itemName\ Name\ of\ the\ item,\ which\ is\ a\ String\r\n\ @return\ item,\ which\ is\ a\ Item.\ If\ not\ exist,\ return\ null\r\n
comment23.params=roomName
comment23.target=Room\ roomname2room(java.lang.String)
comment23.text=\ \r\n\ Convert\ room\ name\ to\ room\r\n\ @param\ roomName\ Name\ of\ the\ room,\ which\ is\ a\ String\r\n\ @return\ room,\ which\ is\ a\ Room.\ If\ not\ exist,\ return\ null\r\n
comment24.params=charctname
comment24.target=Character\ charctname2charct(java.lang.String)
comment24.text=\ \r\n\ Convert\ character\ name\ to\ character\r\n\ @param\ charctname\ Name\ of\ the\ character,\ which\ is\ a\ String\r\n\ @return\ character,\ which\ is\ a\ Character.\ If\ not\ exist,\ return\ null\r\n
comment25.params=itemName
comment25.target=boolean\ getIsCarried(java.lang.String)
comment25.text=\ \r\n\ Whether\ the\ item\ is\ carried\ by\ player\r\n\ @param\ itemName\ Item\ name\r\n\ @return\ true,\ if\ this\ item\ is\ carried\ by\ player,\ false\ otherwise.\r\n
comment26.params=roomName
comment26.target=boolean\ getIsNeighbour(java.lang.String)
comment26.text=\ \r\n\ Whether\ the\ room\ is\ neighbour\ of\ current\ room.\r\n\ @param\ roomName\ Name\ of\ the\ room\r\n\ @return\ true,\ if\ the\ room\ is\ neighbour\ of\ current\ room,\ false\ otherwise.\r\n
comment27.params=
comment27.target=boolean\ isPassGame()
comment27.text=\ \r\n\ @return\ true,\ if\ the\ player\ pass\ the\ game,\ false\ otherwise.\r\n
comment28.params=
comment28.target=boolean\ isFailGame()
comment28.text=\ \r\n\ @return\ true,\ if\ the\ player\ fail\ the\ game,\ false\ otherwise.\r\n
comment29.params=roomName
comment29.target=boolean\ isMagicRoom(Room)
comment29.text=\ \r\n\ Whether\ this\ room\ is\ a\ magic\ transporter\ room.\r\n\ @param\ roomName\ Name\ of\ the\ room\r\n\ @return\ true,\ if\ this\ room\ is\ a\ magic\ transporter\ room,\ false\ otherwise.\r\n
comment3.params=
comment3.target=void\ play()
comment3.text=\r\n\ \ Main\ play\ routine.\ Loops\ until\ end\ of\ play.\r\n
comment30.params=roomName
comment30.target=boolean\ isLocked(Room)
comment30.text=\ \r\n\ Whether\ this\ room\ is\ locked.\r\n\ @param\ roomName\ Name\ of\ the\ room\r\n\ @return\ true,\ if\ this\ room\ is\ locked,\ false\ otherwise.\r\n
comment31.params=roomName
comment31.target=boolean\ isBaseExit(Room)
comment31.text=\ \r\n\ Whether\ this\ room\ is\ the\ base\ exit.\r\n\ @param\ roomName\ Name\ of\ the\ room\r\n\ @return\ true,\ if\ this\ room\ is\ the\ base\ exit,\ false\ otherwise.\r\n
comment32.params=
comment32.target=int\ getTotalWeight()
comment32.text=\ \r\n\ @return\ totalWeight\ Total\ weight\ of\ items\ that\ are\ carried\ with\r\n
comment33.params=itemName
comment33.target=void\ setItemVisible(Item)
comment33.text=\ \r\n\ Make\ this\ item\ to\ be\ visible\r\n\ @param\ itemName\ Item\ name\r\n
comment34.params=
comment34.target=void\ playVideo()
comment34.text=\ \r\n\ Print\ out\ content\ of\ the\ video\r\n
comment35.params=
comment35.target=void\ goRandomRoom()
comment35.text=\ \r\n\ Transport\ to\ a\ random\ room\ except\ locked\ rooms\ and\ magic\ room\ itself\ \r\n
comment36.params=characterName
comment36.target=void\ characterMove(java.lang.String)
comment36.text=\ \r\n\ The\ character\ goes\ to\ a\ random\ room\ which\ is\ linked\ to\ his\ current\ room\r\n\ Character\ moves\ around\ by\ itself\r\n\ @param\ characterName\ Name\ of\ the\ character\r\n
comment37.params=characterName
comment37.target=Room\ generateRandomNeighborRoom(java.lang.String)
comment37.text=\ \r\n\ Generate\ a\ random\ room\ which\ is\ linked\ to\ the\ character's\ current\ room\r\n\ @param\ characterName\ Name\ of\ the\ character\r\n\ @return\ position\ The\ room\ that\ is\ linked\ to\ character's\ current\ room\r\n
comment38.params=position
comment38.target=boolean\ getIsUnaccessible(Room)
comment38.text=\ \r\n\ When\ the\ room\ exist,\ whether\ it\ is\ accessible\:\r\n\ whether\ the\ room\ is\ locked,\ is\ base\ exit,\ or\ is\ magic\ room\r\n\ @param\ position\ Name\ of\ the\ room\r\n\ @return\ true,\ if\ unaccessible,\ false\ otherwise\r\n
comment39.params=
comment39.target=java.lang.String\ getCharactersInfo()
comment39.text=\r\n\ @return\ A\ description\ of\ the\ character\ in\ current\ room.\r\n
comment4.params=
comment4.target=void\ printWelcome()
comment4.text=\r\n\ Print\ out\ the\ opening\ message\ for\ the\ player.\r\n
comment5.params=command
comment5.target=boolean\ processCommand(Command)
comment5.text=\r\n\ Given\ a\ command,\ process\ (that\ is\:\ execute)\ the\ command.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ true\ If\ the\ command\ ends\ the\ game,\ false\ otherwise.\r\n
comment6.params=
comment6.target=void\ printHelp()
comment6.text=\r\n\ "help"\ was\ entered.\r\n\ print\ out\ some\ help\ information.\r\n
comment7.params=
comment7.target=void\ printCommandInstr()
comment7.text=\r\n\ "commandInstruction"\ was\ entered.\r\n\ Print\ out\ detailed\ command\ instructions.\r\n
comment8.params=command
comment8.target=boolean\ quit(Command)
comment8.text=\ \r\n\ "quit"\ was\ entered.\ Check\ the\ rest\ of\ the\ command\ to\ see\r\n\ whether\ we\ really\ quit\ the\ game.\r\n\ @return\ true,\ if\ this\ command\ quits\ the\ game,\ false\ otherwise.\r\n
comment9.params=roomName
comment9.target=void\ lookAround(Room)
comment9.text=\ \r\n\ "lookaround"\ was\ entered.\ \r\n\ Print\ out\ items,\ exits\ and\ characters\ information.\r\n
numComments=40