|
|
@ -70,6 +70,7 @@ class Occupy(Logic): |
|
|
|
{ |
|
|
|
"home_for_team": None, |
|
|
|
"occupied_by_team": None, |
|
|
|
"protected_for_team": None, |
|
|
|
"hill": (self.configuration["hills"] |
|
|
|
[j % self.configuration["height_per_team"]] |
|
|
|
[i % self.configuration["width_per_team"]] |
|
|
@ -87,6 +88,8 @@ class Occupy(Logic): |
|
|
|
for _ in range(self.teams_width): |
|
|
|
map[home_y][home_x]["home_for_team"] = team_id |
|
|
|
map[home_y][home_x]["occupied_by_team"] = team_id |
|
|
|
for x, y in self.PROTECTED_AREA: |
|
|
|
map[(home_y+y) % self.map_height][(home_x+x) % self.map_width]["protected_for_team"] = team_id |
|
|
|
# Initial stav vojáků: |
|
|
|
for soldier_id in range(max(1, self.budget_for_round(0) // self.spawn_price)): |
|
|
|
map[home_y][home_x]["members"].append(self.generate_soldier(team_id, soldier_id)) |
|
|
@ -206,6 +209,7 @@ class Occupy(Logic): |
|
|
|
for field in row: |
|
|
|
new_field = { |
|
|
|
"home_for_team": field["home_for_team"], |
|
|
|
"protected_for_team": field["protected_for_team"], |
|
|
|
"occupied_by_team": field["occupied_by_team"], |
|
|
|
"hill": field["hill"], |
|
|
|
"members": [] |
|
|
|