forked from PythonForum/Plants-VS-Zombies
/
main.py
29 lines (28 loc) · 1.01 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
"""
Module: main.py
Overview:
The main function is defined here. It simply creates an instance of
tools.Control and adds the game states to its dictionary using
tools.setup_states. There should be no need (theoretically) to edit
the tools.Control class. All modifications should occur in this module
and in the setup module.
Imports:
from . import setup,tools
from .states import title
Functions:
main()
"""
from . import setup,tools
from .states import title,splash,menu,creds,story,survive,highscore#, game
def main():
"""Add states to control here."""
run_it = tools.Control(setup.ORIGINAL_CAPTION)
state_dict = {"SPLASH" : splash.Splash(),
"TITLE" : title.Title(),
"MENU" : menu.Menu(),
'CREDS' : creds.Credits(),
'STORY' : story.Story(),
'SURVIVE': survive.Survive(),
'HIGHS' : highscore.Highscore()}
run_it.setup_states(state_dict,"SPLASH")
run_it.main()