Strategická: Lineární budget funkce
+ None jako action opět znamená i zůstání na místě.
This commit is contained in:
parent
0fd1240953
commit
af6dec2f19
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue