-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
75 lines (56 loc) · 1.99 KB
/
Copy pathmain.py
File metadata and controls
75 lines (56 loc) · 1.99 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
73
74
75
# IMPORTS
from HQ import control
import _CORE_ as c
from colorify import fg, bg, pencil, mitm
from time import sleep
# --------------------------------------------------------------------------------------------------------------
# CONTROL STACK AND FUNCTIONS
stack = []
def push(fn):
stack.append(fn)
def pop():
stack.pop()
def peek():
return stack[len(stack) - 1]
# --------------------------------------------------------------------------------------------------------------
# INITIALIZATION
# push(control["atticRoom"])
push(control["danceHall"])
# --------------------------------------------------------------------------------------------------------------
# GAME CONTROL VARIABLES AND FUNCTIONS
def start():
isFirstTime = True
while True:
if c.stackCommand == '':
pass
else:
tokens = c.stackCommand.split(' ')
if tokens[0] == "ADD":
push(control[tokens[1]])
isFirstTime = True
c.stackCommand = ''
elif tokens[0] == "POP":
pop()
c.stackCommand = ''
if isFirstTime:
peek()(True)
isFirstTime = False
else:
peek()(False)
# --------------------------------------------------------------------------------------------------------------
# MAIN PROGRAM
pencil.cls()
pencil.writew(mitm.title + "MAN IN THE MIRROR: ", 0.1)
sleep(0.5)
pencil.writew("THE ESCAPE" + mitm.reset + "\n")
dir(c)
pencil.read(mitm.userChoice + "Press ENTER to continue..." + mitm.reset)
pencil.cls()
pencil.write(mitm.process + "INSTRUCTIONS:")
pencil.read(
mitm.reset +
''' This game displays all text as if it is being typed. Please don't press anything till it's done.
Press ENTER only when a line ends with three dots (...)\n\n'''+
f'''Cutscenes are colored in {mitm.cutscene}magenta{mitm.reset}, so wait till the complete cutscene is completed before pressing ENTER.'''+
'''\n\nPress ENTER to dive down deep into the world of uncertainity...''')
start()