예제 #1
0
파일: game.py 프로젝트: lingsond/tota
    def __init__(self,
                 radiant_heroes,
                 dire_heroes,
                 map_file_path,
                 world_size,
                 debug=False,
                 protected=False,
                 drawers=None):
        self.radiant_heroes = radiant_heroes
        self.dire_heroes = dire_heroes
        self.map_file_path = map_file_path
        self.debug = debug
        self.protected = protected
        self.drawers = drawers or []

        self.heroes = []
        self.ancients = {}
        self.towers = {}
        self.events = []
        self.scores = defaultdict(lambda: 0)

        self.world = World(world_size)

        self.initialize_world_map()
        self.cache_structures()
        self.initialize_heroes()
예제 #2
0
    def __init__(self,
                 radiant_heroes,
                 dire_heroes,
                 map_file_path,
                 world_size,
                 debug=False,
                 drawers=None):
        self.radiant_heroes = radiant_heroes
        self.dire_heroes = dire_heroes
        self.map_file_path = map_file_path
        self.debug = debug
        self.drawers = drawers or []

        self.heroes = []
        self.ancients = {}

        self.world = World(world_size, debug=debug)

        self.initialize_world_map()
        self.cache_ancients()
        self.initialize_heroes()