|
@ -27,6 +27,7 @@ class Logic: |
|
|
@add_logic |
|
|
@add_logic |
|
|
class Occupy(Logic): |
|
|
class Occupy(Logic): |
|
|
MOVE_VECTORS = { |
|
|
MOVE_VECTORS = { |
|
|
|
|
|
None: (0, 0), |
|
|
"stay": (0, 0), |
|
|
"stay": (0, 0), |
|
|
"left": (0, -1), |
|
|
"left": (0, -1), |
|
|
"right": (0, 1), |
|
|
"right": (0, 1), |
|
@ -60,8 +61,10 @@ class Occupy(Logic): |
|
|
"remaining_rounds": 1 |
|
|
"remaining_rounds": 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# zero_state spawnuje jednoho vojáka, poslední (použitelný, takže |
|
|
|
|
|
# předposlední) spawn umožňuje budget na `last_spawn` nových vojáků |
|
|
def budget_for_round(self, round_id): |
|
|
def budget_for_round(self, round_id): |
|
|
return (self.last_spawn * self.spawn_price * (round_id + 1)**2) // (self.rounds_total**2) |
|
|
return self.spawn_price + ((round_id * self.spawn_price * self.last_spawn) // self.rounds_total) |
|
|
|
|
|
|
|
|
# Počáteční stav |
|
|
# Počáteční stav |
|
|
def zero_state(self) -> Any: |
|
|
def zero_state(self) -> Any: |
|
|