-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.ctxt
More file actions
30 lines (30 loc) · 2.18 KB
/
Game.ctxt
File metadata and controls
30 lines (30 loc) · 2.18 KB
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
#BlueJ class context
comment0.target=class\ Game
comment0.text=\nThis\ class\ is\ the\ main\ class\ of\ the\ "World\ of\ Zuul"\ application.\ \n"World\ of\ Zuul"\ is\ a\ very\ simple,\ text\ based\ adventure\ game.\ \ Users\ \ncan\ walk\ around\ some\ scenery.\ That's\ all.\ It\ should\ really\ be\ extended\ \nto\ make\ it\ more\ interesting\!\n\nTo\ play\ this\ game,\ create\ an\ instance\ of\ this\ class\ and\ call\ the\ "play"\nmethod.\n\nThis\ main\ class\ creates\ and\ initialises\ all\ the\ others\:\ it\ creates\ all\nrooms,\ creates\ the\ parser\ and\ starts\ the\ game.\ \ It\ also\ evaluates\ and\nexecutes\ the\ commands\ that\ the\ parser\ returns.\n\n@author\ \ Michael\ Kolling\ and\ David\ J.\ Barnes\n@version\ 1.0\ (February\ 2002)\n\n
comment1.target=parser
comment10.params=
comment10.target=void\ printWelcome()
comment10.text=\nPrint\ out\ the\ opening\ message\ for\ the\ player.\n\n
comment2.params=
comment2.target=void\ createRooms()
comment2.text=\nCreate\ all\ the\ rooms\ and\ link\ their\ exits\ together.\n\n
comment3.params=command
comment3.target=boolean\ processCommand(Command)
comment3.text=\nGiven\ a\ command,\ process\ (that\ is\:\ execute)\ the\ command.\nIf\ this\ command\ ends\ the\ game,\ true\ is\ returned,\ otherwise\ false\ is\nreturned.\n\n
comment4.params=
comment4.target=Game()
comment4.text=\nCreate\ the\ game\ and\ initialise\ its\ internal\ map.\n\n
comment5.params=
comment5.target=void\ play()
comment5.text=\nMain\ play\ routine.\ \ Loops\ until\ end\ of\ play.\n\n
comment6.params=command
comment6.target=void\ goRoom(Command)
comment6.text=\nTry\ to\ go\ to\ one\ direction.\ If\ there\ is\ an\ exit,\ enter\nthe\ new\ room,\ otherwise\ print\ an\ error\ message.\n\n
comment7.params=command
comment7.target=boolean\ quit(Command)
comment7.text=\n"Quit"\ was\ entered.\ Check\ the\ rest\ of\ the\ command\ to\ see\nwhether\ we\ really\ quit\ the\ game.\ Return\ true,\ if\ this\ command\nquits\ the\ game,\ false\ otherwise.\n\n
comment8.params=
comment8.target=void\ printHelp()
comment8.text=\nPrint\ out\ some\ help\ information.\nHere\ we\ print\ some\ stupid,\ cryptic\ message\ and\ a\ list\ of\ the\ \ncommand\ words.\n\n
comment9.target=currentRoom
numComments=11