data/main.py (view raw)
1from data.states.main_menu import main_menu
2from data.states import shop, levels, battle
3from . import setup, tools
4from . import constants as c
5
6
7TOWN = 'town'
8MAIN_MENU = 'main menu'
9CASTLE = 'castle'
10HOUSE = 'house'
11INN = 'Inn'
12ARMOR_SHOP = 'armor shop'
13WEAPON_SHOP = 'weapon shop'
14MAGIC_SHOP = 'magic shop'
15POTION_SHOP = 'potion shop'
16PLAYER_MENU = 'player menu'
17OVERWORLD = 'overworld'
18BROTHER_HOUSE = 'brotherhouse'
19BATTLE = 'battle'
20DUNGEON = 'dungeon'
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 CASTLE: levels.LevelState(CASTLE),
29 HOUSE: levels.LevelState(HOUSE),
30 OVERWORLD: levels.LevelState(OVERWORLD, True),
31 BROTHER_HOUSE: levels.LevelState(BROTHER_HOUSE),
32 INN: shop.Inn(),
33 ARMOR_SHOP: shop.ArmorShop(),
34 WEAPON_SHOP: shop.WeaponShop(),
35 MAGIC_SHOP: shop.MagicShop(),
36 POTION_SHOP: shop.PotionShop(),
37 BATTLE: battle.Battle(),
38 DUNGEON: levels.LevelState(DUNGEON, True)
39 }
40
41 run_it.setup_states(state_dict, c.MAIN_MENU)
42 run_it.main()