auto create & edit battles

This commit is contained in:
Maxime Réaux 2026-01-30 18:55:39 +01:00
parent 9f676f6b9d
commit 6bd3ee31dc
10 changed files with 442 additions and 55 deletions

View file

@ -318,7 +318,7 @@ class Model:
war = self.get_war_by_round(round_id)
war.remove_round(round_id)
# Choices methods
# Choice methods
def create_choice(self, round_id: str, participant_id: str) -> Choice:
war = self.get_war_by_round(round_id)
@ -337,3 +337,14 @@ class Model:
if s.round_id == round_id
]
return camp, rnd, participants, sectors
# Battle methods
def create_battle(self, round_id: str, sector_id: str) -> Battle:
war = self.get_war_by_round(round_id)
return war.create_battle(round_id, sector_id)
def remove_battle(self, round_id: str, sector_id: str):
war = self.get_war_by_round(round_id)
war.remove_battle(round_id, sector_id)