data/main.py (view raw)
1from data.states.main_menu import main_menu
2from data.states import shop
3from data.states import levels
4from . import setup, tools
5from . import constants as c
6
7
8TOWN = 'town'
9MAIN_MENU = 'main menu'
10CASTLE = 'castle'
11HOUSE = 'house'
12INN = 'Inn'
13ARMOR_SHOP = 'armor shop'
14WEAPON_SHOP = 'weapon shop'
15MAGIC_SHOP = 'magic shop'
16POTION_SHOP = 'potion shop'
17PLAYER_MENU = 'player menu'
18OVERWORLD = 'overworld'
19BROTHER_HOUSE = 'brother_house'
20BATTLE = 'battle'
21
22
23def main():
24 """Add states to control here"""
25 run_it = tools.Control(setup.ORIGINAL_CAPTION)
26 state_dict = {MAIN_MENU: main_menu.Menu(),
27 TOWN: levels.LevelState(TOWN),
28 HOUSE: levels.LevelState(HOUSE),
29 OVERWORLD: levels.LevelState(OVERWORLD),
30 INN: shop.Inn(),
31 ARMOR_SHOP: shop.ArmorShop(),
32 WEAPON_SHOP: shop.WeaponShop(),
33 MAGIC_SHOP: shop.MagicShop(),
34 POTION_SHOP: shop.PotionShop(),
35 }
36
37 run_it.setup_states(state_dict, c.MAIN_MENU)
38 run_it.main()