wip close round/campaign/war + refacto json None

This commit is contained in:
Maxime Réaux 2026-02-11 19:22:43 +01:00
parent 4c8086caf4
commit 6cbb7c6534
26 changed files with 474 additions and 108 deletions

View file

@ -104,6 +104,11 @@ class Round:
for bat in self.battles.values()
)
def all_battles_finished(self) -> bool:
return all(
b.winner_id is not None or b.is_draw() for b in self.battles.values()
)
def create_battle(self, sector_id: str) -> Battle:
if sector_id not in self.battles:
battle = Battle(sector_id=sector_id, player_1_id=None, player_2_id=None)