-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.ctxt
73 lines (73 loc) · 5.28 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
#BlueJ class context
comment0.target=Game
comment0.text=\r\n\ \ This\ is\ the\ main\ class\ of\ the\ Prison\ Break\ game.\ \r\n\ \r\n\ \ To\ play\ this\ game,\ create\ an\ instance\ of\ this\ class\ and\ call\ the\ "play"\r\n\ \ method.\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\ evaluates\ and\r\n\ \ executes\ the\ commands\ that\ the\ parser\ returns.\r\n\ \r\n\ @author\ \ Michael\ K\u00F6lling,\ David\ J.\ Barnes\ and\ Michael\ Seiranian\r\n\ @version\ 2016.02.29\r\n
comment1.params=
comment1.target=Game()
comment1.text=\r\n\ Create\ the\ game,\ initialise\ its\ internal\ map,\ items,\ players,\ their\ starting\ locations\ and\ which\ items\ unlock\ which\ rooms.\r\n
comment10.params=
comment10.target=void\ setCharacterLocations()
comment10.text=\r\n\ Set\ character\ starting\ locations\r\n
comment11.params=
comment11.target=void\ play()
comment11.text=\r\n\ \ Main\ play\ routine.\ \ Loops\ until\ end\ of\ play.\r\n
comment12.params=command
comment12.target=boolean\ processCommand(Command)
comment12.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
comment13.params=
comment13.target=void\ printHelp()
comment13.text=\r\n\ Print\ out\ some\ help\ information.\r\n\ Here\ we\ print\ some\ stupid,\ cryptic\ message\ and\ a\ list\ of\ the\ \r\n\ command\ words.\r\n
comment14.params=command
comment14.target=void\ goRoom(Command)
comment14.text=\ \r\n\ Try\ to\ go\ in\ one\ direction.\ If\ there\ is\ an\ exit,\ enter\ the\ new\r\n\ room,\ otherwise\ print\ an\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment15.params=command
comment15.target=void\ takeItem(Command)
comment15.text=\ \r\n\ Try\ to\ take\ item.\ If\ there\ such\ item\ in\ current\ room,\ take\ the\ item,\r\n\ otherwise\ print\ an\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment16.params=
comment16.target=java.lang.String\ getItemsHoldingString()
comment16.text=\ \r\n\ @return\ string\ of\ items\ currently\ holding\r\n
comment17.params=
comment17.target=int\ getTotalWeightOfItemsHolding()
comment17.text=\ \r\n\ @return\ total\ weight\ of\ items\ holding\r\n
comment18.params=command
comment18.target=void\ dropItem(Command)
comment18.text=\ \r\n\ Try\ to\ drop\ item.\ If\ you\ are\ holding\ such\ item,\ drop\ the\ item,\r\n\ otherwise\ print\ an\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment19.params=command
comment19.target=boolean\ useItem(Command)
comment19.text=\ \r\n\ Use\ item.\ If\ the\ item\ exists\ in\ current\ items\ holding\ and\ it\ is\ the\ \r\n\ correct\ item\ the\ unlocks\ the\ room,\ unlock\ the\ room\ and\ go\ in\ it,\r\n\ otherwise\ print\ an\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ return\ true\ when\ game\ must\ be\ finished\r\n
comment2.params=
comment2.target=void\ printWelcome()
comment2.text=\r\n\ Print\ out\ the\ main\ terminal\ for\ the\ player.\r\n
comment20.params=command
comment20.target=void\ back(Command)
comment20.text=\ \r\n\ Go\ back.\ Goes\ back\ a\ room.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment21.params=command
comment21.target=void\ talkToCharacter(Command)
comment21.text=\ \r\n\ Talk\ to\ character.\ If\ you\ are\ in\ a\ room\ with\ a\ character,\ you\ can\ talk\ to\ them,\r\n\ otherwise\ print\ an\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment22.params=command
comment22.target=void\ giveItem(Command)
comment22.text=\ \r\n\ Give\ an\ item\ to\ a\ character.\ If\ the\ item\ you\ are\ giving\ is\ matches\ and\ the\ character\ is\ the\ neighbour,\r\n\ The\ neighbour\ starts\ a\ fire\ after\ you\ move\ again,\r\n\ otherwise\ print\ an\ appropriate\ error\ message.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n
comment23.params=command
comment23.target=boolean\ quit(Command)
comment23.text=\ \r\n\ "Quit"\ was\ entered.\ Check\ the\ rest\ of\ the\ command\ to\ see\r\n\ whether\ we\ really\ quit\ the\ game.\r\n\ @param\ command\ The\ command\ to\ be\ processed.\r\n\ @return\ true,\ if\ this\ command\ quits\ the\ game,\ false\ otherwise.\r\n
comment3.params=
comment3.target=void\ createRooms()
comment3.text=\r\n\ Create\ all\ the\ rooms.\r\n\r\n
comment4.params=
comment4.target=void\ addRoomsToSet()
comment4.text=\r\n\ Add\ rooms\ to\ set\ "allRooms".\r\n\ \r\n
comment5.params=
comment5.target=void\ initialiseRoomExits()
comment5.text=\r\n\ Link\ room\ exits\ together.\r\n\r\n
comment6.params=
comment6.target=void\ createItems()
comment6.text=\r\n\ \ Create\ the\ items,\ sets\ their\ names\ and\ weights\r\n\ \ \r\n
comment7.params=
comment7.target=void\ setItemLocations()
comment7.text=\r\n\ Set\ the\ starting\ locations\ of\ the\ items.\r\n\ \r\n
comment8.params=
comment8.target=void\ setRoomUnlockers()
comment8.text=\r\n\ Set\ which\ item\ unlocks\ which\ room\r\n
comment9.params=
comment9.target=void\ createCharacters()
comment9.text=\r\n\ Create\ the\ characters.\ Set\ their\ name\ and\ default\ response\r\n
numComments=24