-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
45 lines (37 loc) · 1.19 KB
/
main.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
########################################
# Ho Ho Home: the Santa Maze Game
# (main.py)
# By: Sarah Chen (sarahc2)
########################################
# Combine gameScreens and mazeModes
########################################
#
# Citations:
# 1) incorporated subclassing ModalApp and Mode idea from
# https://www.cs.cmu.edu/~112/notes/notes-animations-part3.html
#
########################################
from gameScreens import *
from mazeModes import *
class MyApp(ModalApp):
def appStarted(app):
# from gameScreens
app.titleScreen = TitleScreen()
app.backgroundScreen = BackgroundScreen()
app.instructionsScreen = InstructionsScreen()
app.sleighScreen = SleighScreen()
app.finalScreen = FinalScreen()
# from mazeModes
app.maze = Maze()
app.radiusMode = RadiusMode()
app.grinchMode = GrinchMode()
app.presents = 100
app.finalPresents = 100
app.timeSec = 0
app.timeMin = 0
app.timerMode = True
app.timerDelay = 10
app.setActiveMode(app.titleScreen)
def timerFired(app):
app._activeMode.timerFired()
MyApp(width=1000, height=800)