Beispiel #1
0
 def pass_turn(self):
     """ Pass a game turn. """
     for team in self.teams:
         for entity in self.team_entities[team]:
             self.move_entity(entity)
     self.turn += 1
     self.state = BaseState(self)
Beispiel #2
0
    def __init__(self, root_console):
        self.gui = GUI(root_console)
        self.game_console = tcod.console.Console(40, 40)
        self.state = BaseState(self)

        self.game_map = Map(self.game_console.width, self.game_console.height)
        self.teams = ["RED_TEAM", "BLUE_TEAM"]
        self.team_entities = {}
        for team in self.teams:
            self.team_entities[team] = []
        self.place_team("RED_TEAM")
        self.place_team("BLUE_TEAM")

        self.turn = 0