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

@ -177,7 +177,7 @@ class War:
def remove_sector(self, sector_id: str):
camp = self.get_campaign_by_sector(sector_id)
camp.remove_sector(sector_id)
# Campaign participant methods
def get_available_war_participants(self, campaign_id: str) -> list[WarParticipant]:
@ -227,6 +227,16 @@ class War:
camp = self.get_campaign_by_round(round_id)
camp.remove_choice(round_id, participant_id)
# Battle methods
def create_battle(self, round_id: str, sector_id: str) -> Battle:
camp = self.get_campaign_by_round(round_id)
return camp.create_battle(round_id, sector_id)
def remove_battle(self, round_id: str, sector_id: str):
camp = self.get_campaign_by_round(round_id)
camp.remove_battle(round_id, sector_id)
class Objective:
def __init__(self, name: str, description: str):
self.id: str = str(uuid4())