-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaselevel.py
64 lines (57 loc) · 1.65 KB
/
baselevel.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
# import needed modules
import asyncio
import subprocess
import time
from os import path
# clarifies what cls() does
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
# starts level
print("\nLoading...")
async def main(int_tries=3):
tries = int_tries
await asyncio.sleep(2)
print('\nFinished!')
await asyncio.sleep(2)
cls()
# First-Time Question
QUESTIONNAMEGOESHERE = input('\n\QUESTION GOES HERE\n\n')
file = open("QUESTIONNAMEGOESHERE.txt", "w")
print('*writes that down*')
file.write(color)
await asyncio.sleep(1)
cls()
print('Go on...')
# Repeated Question
q = input('QUESTION GOES HERE\n\n')
file = open("QUESTIONNAMEGOESHERE.txt")
answer = file.read().replace("\n", " ")
file.close()
while q:
if q in answer:
cls()
print('Go on...')
break
else:
print('You are not that great at lying...')
if tries == 0:
quit()
else:
tries = tries - 1
print('You have ' + str(tries) + ' left!')
break
await asyncio.sleep(1)
# ends level
await asyncio.sleep(1)
print("\nYour free to go.\n\nYou won! Victory!\n\n\n")
if path.exists("moddedlevel2.py"):
subprocess.call("moddedlevel2.py", shell=True)
if path.exists("level2.py"):
subprocess.call("level2.py", shell=True)
else:
print("Thanks for playing!")
time.sleep(1)
quit()
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())