all repos — Legends-RPG @ a3ef5e6b4ee7fab5e9532a97a89dcf999279f5df

A fantasy mini-RPG built with Python and Pygame.

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
 8def main():
 9    """Add states to control here"""
10    run_it = tools.Control(setup.ORIGINAL_CAPTION)
11    state_dict = {c.TOWN: town.Town(c.TOWN, 25, 50),
12                  c.MAIN_MENU: main_menu.Menu(c.MAIN_MENU),
13                  c.CASTLE: castle.Castle(c.CASTLE, 25, 27),
14                  c.SHOP: shop.Shop(c.SHOP)}
15
16    run_it.setup_states(state_dict, c.MAIN_MENU)
17    run_it.main()