File tree 1 file changed +6
-0
lines changed 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
from sys import exit
2
2
3
3
def gold_room ():
4
+ """Describe gold room and take user input."""
4
5
print "This room is full of gold. How much do you take?"
5
6
6
7
next = raw_input ("> " )
8
+
7
9
if "0" in next or "1" in next :
8
10
how_much = int (next )
9
11
else :
@@ -17,6 +19,7 @@ def gold_room():
17
19
18
20
19
21
def bear_room ():
22
+ """Describe bear room and take user input."""
20
23
print "There is a bear here."
21
24
print "The bear has a bunch of honey."
22
25
print "The fat bear is in front of another door."
@@ -39,6 +42,7 @@ def bear_room():
39
42
print "I got no idea what that means."
40
43
41
44
def cthulu_room ():
45
+ """Describe Cthulu room and take user input."""
42
46
print "Here you see the great evil Cthulu."
43
47
print "He, it, whatever stares at you and you go insane."
44
48
print "Do you flee for your life or eat your head?"
@@ -54,10 +58,12 @@ def cthulu_room():
54
58
55
59
56
60
def dead (why ):
61
+ """Print out death message and exit the program."""
57
62
print why , "Good job!"
58
63
exit (0 )
59
64
60
65
def start ():
66
+ """Describe game start and take user input."""
61
67
print "You are in a dark room."
62
68
print "There is a door to your right and left."
63
69
print "Which one do you take?"
You can’t perform that action at this time.
0 commit comments