diff --git a/server/hra/game.py b/server/hra/game.py index c4358a1..5b1d296 100644 --- a/server/hra/game.py +++ b/server/hra/game.py @@ -27,6 +27,7 @@ class Logic: @add_logic class Occupy(Logic): MOVE_VECTORS = { + None: (0, 0), "stay": (0, 0), "left": (0, -1), "right": (0, 1), @@ -60,8 +61,10 @@ class Occupy(Logic): "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): - 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 def zero_state(self) -> Any: