-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextBasedAdventure Cold Feet
More file actions
72 lines (58 loc) · 2.21 KB
/
TextBasedAdventure Cold Feet
File metadata and controls
72 lines (58 loc) · 2.21 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
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
def intro():
print('''You open your eyes and find that you are very thirsty.
You sit up on your bed and begin to stand. As your foot
meets the floor, your foot involuntarily jerks back.
There is no way you are going to walk on that cold
floor with bare feet. What do you do?''')
def getInput():
global userResponse
print()
userResponse = input()
def processInput():
global userResponse, feetDone, playing
if "sock" in userResponse:
print('''You find your socks however they have large holes
in them. You should find something else.''')
elif "blanket" in userResponse:
print('''You attempt to scoot your feet on the floor on
top of your blanket. You make it two feet before tripping
and falling down. This will not work. What else is here I
could use?''')
elif "shoe" in userResponse:
print('''You remember that your shoes were taken off at
the door due to all the mud. No use to you at the moment.''')
elif "shirt" in userResponse and feetDone < 1:
print('''You grab a shirt and quickly tie it around your foot.
Hesitantly you test out your makeshift solution. Hey, this will work!''')
feetDone+=1
elif "mittens" in userResponse or "gloves" in userResponse:
print('''These are made for hands, but you'll try anything at
this point. You place them on your feet, and timidly test your
makeshift footwear. They work!''')
feetDone+=2
elif "mitten" in userResponse or "glove" in userResponse:
print('''This is made for hands, but you'll try anything at
this point. You place it on your foot, and timidly test your
makeshift footwear. It works!''')
feetDone+=1
else:
print('''I don't think that would work. You should look for
something else''')
if feetDone == 1:
print('''That takes care of one foot. Now for the other.''')
if feetDone >= 2:
playing = False
def ending():
print()
print('''Finally you are able to walk across the frigid floor.
You quickly make your way to the kitchen and quench your thirst.
The end.''')
#main
playing = True
feetDone = 0
userResponse=""
intro()
while playing:
getInput()
processInput()
ending()