-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.py
344 lines (312 loc) Β· 12.6 KB
/
game.py
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
import sys
import random
from art import logo1, logo2, game_over_logo, you_win, unlock
import winsound
print(logo2)
print("")
print("***UNLOCK 3 MEMORIES TO WIN THE GAME***")
print("")
print("Argh... my head is killing me...π΅βπ«π")
print("What the hell happened last night??π²")
print("Let's see... I'm in my flat -- that's good! --")
memories = []
def quit():
wanna_quit = input("> ").lower()
if wanna_quit == "y":
print("πππBooo! You quit the game!")
elif wanna_quit == "n":
main(sound)
else:
print("Sorry I didn't catch that")
quit()
def game_over():
print(game_over_logo)
print("You failed!")
print()
print("Your progress has been saved")
print()
print("Do you want to try again?")
try_again = input("y / n > ")
if try_again == "y":
main(sound)
elif try_again == "n":
sys.exit()
else:
game_over()
def phone(_has_run=[]):
if _has_run:
print("I've already checked my phone.")
main(sound)
else:
print("*** π± Check ***")
print("---π calls")
print("---π© texts")
print("---π§ emails")
answer = input("> ").lower()
if answer not in ["calls", "texts", "emails"]:
print("Sorry I didn't catch that...π€")
phone()
elif answer == "calls":
print("Last calls:")
print("")
contacts = ["Michelle", "Jack", "Ruby"]
code_nation = ["Dave", "Tim", "Jay"]
for i in contacts:
print("-", i)
print()
print("or... call someone from Code Nation...")
print()
for name in code_nation:
print("-", name)
print("Who should I call?")
contact = input("> ").lower()
if contact.lower() in [x.lower() for x in contacts]:
print(f"{contact} is not answering the phone...")
print("Maybe I need to check something else in my phone...")
phone()
elif contact.lower() in [x.lower() for x in code_nation]:
print(f"{contact} has blocked you....")
phone()
elif contact.lower() not in [x.lower() for x in contacts]:
print(f"There is no {contact} in your contacts.")
phone()
elif answer == "texts" or answer == "text":
print("Last text is from my bestie (at 7am this morning)...")
print("""
BESTIE -- Yesterday night you opened a bunch of tampons and said they looked like little ghosts...
-- ... and you tried to "haunt" me...
""")
reply1 = "1----- What?? Where did I get the tampons from??"
reply2 = "2----- I don't use tampons!"
reply3 = "3----- ...they do kinda look like little ghosts..."
print()
print()
print("Which of these options do you want to text back? (type 1, 2 or 3)")
print(reply1)
print(reply2)
print(reply3)
reply = input("> ")
if reply.lower() == "1":
print("typing...")
print("What?? Where did I get the tampons from??")
phone()
elif reply.lower() == "2":
print("typing...")
print("2----- I don't use tampons!")
phone()
elif reply.lower() == "3":
print("typing...")
print("...they do kinda look like little ghosts...")
phone()
else:
print("Sorry I didn't catch that")
phone()
else:
answer == "emails"
print("My last email is an Uber receipt. I've ordered an Uber from Northern Quarter.... Hold on...")
secret_word = "Terrace"
guess_count = 0
guess_limit = 3
while guess_count < guess_limit:
print("""In which of these Manchester bars did I party yesterday night?
Cane & Grane
Terrace
Wetherspoons
Dive
Bar 21
""")
guess = input("> ").lower()
guess_count += 1
if guess.lower() != secret_word.lower():
print("No... I'm sure I wasn't there... Let's try again")
elif guess.lower() == secret_word.lower():
print("Yes! Now I remember! I was in Terrace!")
memories.append("Phone Memory")
print()
print()
print()
print(unlock)
print(f" *** πYOU HAVE UNLOCKED {len(memories)} MEMORIES!π ***")
_has_run.append(1)
main(sound)
break
else:
game_over()
def roll_dices(_has_run=[]):
if _has_run:
print("I've already checked that.")
main(sound)
else:
min = 1
max = 6
roll_again = "y"
roll_again = input("Roll the dices in pocket? (y / n) ").lower()
if roll_again == "y":
print("Rolling the dices...")
print("The values are....")
print (random.randint(min, max))
print (random.randint(min, max))
roll_dices()
elif roll_again == "n":
print("Dices......Of course! I was in the casino last night!")
memories.append("Coat Memory")
print()
print()
print()
print(unlock)
print(f" *** πYOU HAVE UNLOCKED {len(memories)} MEMORIES!π ***")
_has_run.append(1)
main(sound)
else:
print ("Sorry didn't catch that")
roll_dices()
def coat(_has_run=[]):
if _has_run:
print("I've already checked my coat.")
main(sound)
else:
print("Check right or left pocket?")
answer = input("> ").lower()
if answer not in ["right", "left"]:
print("Sorry I didn't catch that...π€")
coat()
elif answer == "right":
print("What?? A condom?? What the heck did I do last night?!")
coat()
elif answer == "left":
roll_dices()
_has_run.append(1)
def ana(_has_run=[]):
if _has_run:
print("I've already checked the trash.")
main(sound)
else:
kajbalkjc = "blackjack"
alqetiu = "tequila"
dickiefrench = "fried chicken"
guess_count = 0
guess_limit = 3
while guess_count < guess_limit:
print("...kajbalkjc...")
print("'kajbalkjc'? What does this mean? Is it even a word??")
print("What word can it be...")
kajbalkjc_pro = input("").lower()
guess_count += 1
if kajbalkjc_pro != kajbalkjc:
print ("No that can't be right, Maybe it's something else?")
elif kajbalkjc_pro == kajbalkjc:
print ("Of course! It's 'BLACKJACK'!")
guess_count = 0
guess_limit = 3
while guess_count < guess_limit:
print("Let me see what else is in there...")
print("...alqetiu...")
print("What's that now??")
print("What word can it be...")
alqetiu_pro = input("").lower()
guess_count += 1
if alqetiu_pro != alqetiu:
print ("No that can't be right, Maybe it's something else?")
elif alqetiu_pro == alqetiu:
print ("Of course! It's 'TEQUILA'!")
guess_count = 0
guess_limit = 3
while guess_count < guess_limit:
print("Let me see what else is in there...")
print("...dickiefrench...")
print ("OMG... this is getting worse...")
print("What word can it be...")
dickiefrench_pro = input("").lower()
guess_count += 1
if dickiefrench_pro != dickiefrench:
print ("No that can't be right, Maybe it's something else?")
elif dickiefrench_pro == dickiefrench:
print ("Of course! It's 'FRIED CHICKEN'!")
memories.append("Kitchen Memory")
print()
print()
print()
print(unlock)
print(f" *** πYOU HAVE UNLOCKED {len(memories)} MEMORIES!π ***")
_has_run.append(1)
main(sound)
else:
game_over()
def kitchen(_has_run=[]):
if _has_run:
print("I've already been in the kitchen.")
main(sound)
else:
print("Shall I look in the microwave or the trash bin?")
answer = input("> ").lower()
if answer not in ["trash", "microwave"]:
print("Sorry I didn't catch that...π€")
kitchen()
elif answer == "microwave":
print("What is my tablet doing in the microwave??")
kitchen()
elif answer == "trash" or answer == "trash bin" or answer == "bin":
ana()
_has_run.append(1)
def win_game():
if len(memories) == 3:
print("""NOW I REMEMBER IT ALL.....!!
We had predrinks at mine, then we hit the town.
We went to the casino, we gambled... and I lost Β£700!
Then I slipped and fell on the blackjack table and they kicked us out..
I had the BRILLIANT idea to take a tequila shot in every bar on the way from Portland St to Northern Quarter...
That's a LOT of bars!
Somehow we ended up in Terrace, in Northern Quarter, and I think I met someone there...
We decided to hook up, and my friend gave me a condom... but it's still unused...
That's probably why I decided to have a take away fried chicken and call an Uber home.
... and I put my tablet in the microwave thinking it was pizza!
Sounds like a good night!
""")
print(you_win)
print("πππ")
print("Congratulations! You win the game!π")
print()
print()
print()
sys.exit()
sound = winsound.PlaySound("Chill.wav", winsound.SND_ASYNC + winsound.SND_LOOP)
def main(sound):
win_game()
print("")
print("What shall I do?")
print("")
print("π± Check my phone")
print("π§₯ Check my coat")
print("β‘οΈ Go to the kitchen")
print("β QUIT GAME")
print("")
answer = input("> ").lower()
if answer == "phone" or answer == "check phone" or answer == "check my phone":
phone()
elif answer == "coat" or answer == "check coat" or answer == "check my coat":
coat()
elif answer == "kitchen" or answer == "go to kitchen" or answer == "go to the kitchen":
kitchen()
elif answer == "help":
print("")
print("What shall I do?")
print("")
print("π± Check my phone")
print("π§₯ Check my coat")
print("β‘οΈ Go to the kitchen")
print("β QUIT GAME")
print("")
answer = input("> ").lower()
elif answer == "quit":
quit_choice = input("Are you sure you wanna quit? y / n").lower()
if quit_choice == "y":
quit()
elif quit_choice == "n":
main(sound)
else:
print("sorry I didn't catch that")
main(sound)
else:
print("Sorry I didn't catch that...π€")
main(sound)
main(sound)