-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGame.ctxt
26 lines (26 loc) · 1.48 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
#BlueJ class context
comment0.params=
comment0.target=Game()
comment0.text=\r\n\ Create\ the\ game\ and\ initialise\ its\ internal\ map.\r\n
comment1.params=
comment1.target=void\ createRooms()
comment1.text=\r\n\ Create\ all\ the\ rooms\ and\ link\ their\ exits\ together.\r\n
comment2.params=
comment2.target=void\ play()
comment2.text=\r\n\ \ Main\ play\ routine.\ \ Loops\ until\ end\ of\ play.\r\n
comment3.params=
comment3.target=void\ printWelcome()
comment3.text=\r\n\ Print\ out\ the\ opening\ message\ for\ the\ player.\r\n
comment4.params=command
comment4.target=boolean\ processCommand(Command)
comment4.text=\r\n\ Given\ a\ command,\ process\ (that\ is\:\ execute)\ the\ command.\r\n\ If\ this\ command\ ends\ the\ game,\ true\ is\ returned,\ otherwise\ false\ is\r\n\ returned.\r\n
comment5.params=
comment5.target=void\ printHelp()
comment5.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
comment6.params=command
comment6.target=void\ goRoom(Command)
comment6.text=\ \r\n\ Try\ to\ go\ to\ one\ direction.\ If\ there\ is\ an\ exit,\ enter\ the\ new\r\n\ room,\ otherwise\ print\ an\ error\ message.\r\n
comment7.params=command
comment7.target=boolean\ quit(Command)
comment7.text=\ \r\n\ "Quit"\ was\ entered.\ Check\ the\ rest\ of\ the\ command\ to\ see\r\n\ whether\ we\ really\ quit\ the\ game.\ Return\ true,\ if\ this\ command\r\n\ quits\ the\ game,\ false\ otherwise.\r\n
numComments=8