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 data.states.house import house
6from data.states.overworld import overworld
7from . import setup, tools
8from . import constants as c
9
10
11TOWN = 'town'
12MAIN_MENU = 'main menu'
13CASTLE = 'castle'
14HOUSE = 'house'
15INN = 'Inn'
16ARMOR_SHOP = 'armor shop'
17WEAPON_SHOP = 'weapon shop'
18MAGIC_SHOP = 'magic shop'
19POTION_SHOP = 'potion shop'
20PLAYER_MENU = 'player menu'
21OVERWORLD = 'overworld'
22
23
24def main():
25 """Add states to control here"""
26 run_it = tools.Control(setup.ORIGINAL_CAPTION)
27 state_dict = {TOWN: town.Town(),
28 MAIN_MENU: main_menu.Menu(),
29 CASTLE: castle.Castle(),
30 HOUSE: house.House(),
31 INN: shop.Inn(),
32 ARMOR_SHOP: shop.ArmorShop(),
33 WEAPON_SHOP: shop.WeaponShop(),
34 MAGIC_SHOP: shop.MagicShop(),
35 POTION_SHOP: shop.PotionShop(),
36 OVERWORLD: overworld.Overworld()
37 }
38
39 run_it.setup_states(state_dict, c.MAIN_MENU)
40 run_it.main()