-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbridgekeeper
More file actions
executable file
·53 lines (43 loc) · 1.54 KB
/
bridgekeeper
File metadata and controls
executable file
·53 lines (43 loc) · 1.54 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
#!/usr/bin/python3
import colors as c
print(c.clear)
print(c.red + '''
Who would cross the bridge of death,
must answer me these questions 3,
ere the other side he see.
''')
def die():
print(c.reset + c.red + 'You are cast into the gorge of Eternal peril.')
print(c.reset + c.red + 'pppkkaaacchhchch!!!')
def live():
print(c.reset + c.green + 'You pass.')
print(c.reset + c.green + 'Ok, off you go.')
def ask(question):
print(question)
return input('> ').strip().lower()
ask(question):
name = ask(c.yellow + 'What is your name?' + c.reset)
quest = ask(c.yellow + 'What is your quest?' + c.reset)
if 'lancelot' in name or 'galahad' in name:
color = ask(c.yellow + 'What is your favorite color?' + c.reset)
if color == 'blue':
live()
else:
die()
elif 'robin' in name:
capital = ask(c.reset + c.blue + 'What is the capital of Assyria?')
if ('assur' in capital):
live()
else:
die()
elif 'arthur' in name:
answer = ask(c.reset + c.blue + 'what... is the air-speed velocity of an unladen swallow?')
if ('african' in answer and 'european' in answer) or '21' in answer:
print(c.reset + c.yellow + 'What? I dont know that.')
print(c.reset + c.red + 'pppkkkuuurchchch!!!')
print(c.reset + c.green + 'Random knight: How do you know so much about swallows?')
print('king arthur: Well, you have to know these things when your king you know.')
else:
print(c.reset + c.red + 'your not a knight')
print(c.reset + c.red + 'You are unworthy')
die()