Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_and_place_units(game, team, start_positions, unit_types):
- for pos, unit_type in zip(start_positions, unit_types):
- unit = UnitFactory.create_unit(unit_type, x=pos[0], y=pos[1], team=team, game=game)
- game.unit_map.place_unit(unit, pos)
- game.unit_handler.add_unit(unit)
- red_team_positions = [(2, 0), (3, 0), (4, 0), (5, 0), (6, 0)]
- blue_team_positions = [(2, 9), (3, 9), (4, 9), (5, 9), (6, 9)]
- unit_types = ["Knight", "Archer", "Footman", "Knight", "Crossbowman"]
- create_and_place_units(game, "red", red_team_positions, unit_types)
- create_and_place_units(game, "blue", blue_team_positions, unit_types)
Advertisement
Add Comment
Please, Sign In to add comment