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 = 'brotherhouse'
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 BROTHER_HOUSE: levels.LevelState(BROTHER_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 }
37
38 run_it.setup_states(state_dict, c.MAIN_MENU)
39 run_it.main()