Exemple #1
0
 def select_all(self, move: Move, vehicle_type=None, add_to_selection=False):
     move.action = ActionType.CLEAR_AND_SELECT if not add_to_selection else ActionType.ADD_TO_SELECTION
     move.left = 0.0
     move.top = 0.0
     move.right = self.game.world_width
     move.bottom = self.game.world_height
     if vehicle_type is not None:
         move.vehicle_type = vehicle_type
Exemple #2
0
 def do_select(s: MyStrategy, w: World, g: Game, m: Move, a=area):
     m.action = action
     #print("Selecting: " + str(a))
     m.left = a.left - fuzz
     m.right = a.right + fuzz
     m.top = a.top
     m.bottom = a.bottom
     m.group = group
     m.vehicle_type = vtype
Exemple #3
0
    def move(self, me: Player, world: World, game: Game, move: Move):
        if world.tick_index == 0:
            move.action = ActionType.CLEAR_AND_SELECT
            move.right = world.width
            move.bottom = world.height

        if world.tick_index == 1:
            move.action = ActionType.MOVE
            move.x = world.width / 2.0
            move.y = world.height / 2.0
Exemple #4
0
    def move(self, me: Player, world: World, game: Game, move: Move):
        self.map.update(world.new_vehicles, world.vehicle_updates)
        if world.tick_index == 0:
            move.action = ActionType.CLEAR_AND_SELECT
            move.right = world.width
            move.bottom = world.height

        if world.tick_index == 1:
            move.action = ActionType.MOVE
            move.x = world.width / 1.0
            move.y = world.height / 2.0