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