5
5
# Declare all the rooms
6
6
7
7
room = {
8
- 'outside' : Room ("Outside Cave Entrance" , "North of you, the cave mount beckons" ),
8
+ 'outside' : Room ("Outside Cave Entrance" ,
9
+ "North of you, the cave mount beckons" ),
9
10
10
- 'foyer' : Room ("Foyer" , "Dim light filters in from the south. Dusty passages run north and east." ),
11
+ 'foyer' : Room ("Foyer" , """Dim light filters in from the south. Dusty
12
+ passages run north and east.""" ),
11
13
12
14
'overlook' : Room ("Grand Overlook" , """A steep cliff appears before you, falling
13
15
into the darkness. Ahead to the north, a light flickers in
14
16
the distance, but there is no way across the chasm.""" ),
15
17
16
- 'narrow' : Room ("Narrow Passage" , """The narrow passage bends here from west to north. The smell
17
- of gold permeates the air.""" ),
18
+ 'narrow' : Room ("Narrow Passage" , """The narrow passage bends here from west
19
+ to north. The smell of gold permeates the air.""" ),
18
20
19
21
'treasure' : Room ("Treasure Chamber" , """You've found the long-lost treasure
20
22
chamber! Sadly, it has already been completely emptied by
@@ -38,7 +40,8 @@ def tryDirection(d, curRoom):
38
40
"""
39
41
Try to move a direction, or print an error if the player can't go that way.
40
42
41
- Returns the room the player has moved to (or the same room if the player didn't move).
43
+ Returns the room the player has moved to (or the same room if the player
44
+ didn't move).
42
45
"""
43
46
attrib = d + '_to'
44
47
@@ -91,4 +94,3 @@ def tryDirection(d, curRoom):
91
94
player .curRoom = tryDirection (s , player .curRoom )
92
95
else :
93
96
print ("Unknown command {}" .format (s ))
94
-
0 commit comments