display war,campaign,round menu
This commit is contained in:
parent
c64bb2e90b
commit
e33dec40be
7 changed files with 277 additions and 1556 deletions
|
|
@ -59,3 +59,9 @@ class Campaign:
|
|||
rnd = next((r for r in self.rounds if r.id == round_id), None)
|
||||
if rnd:
|
||||
self.rounds.remove(rnd)
|
||||
|
||||
def get_round_index(self, round_id: str) -> int:
|
||||
for index, rnd in enumerate(self.rounds, start=1):
|
||||
if rnd.id == round_id:
|
||||
return index
|
||||
raise KeyError("Round not found in campaign")
|
||||
|
|
|
|||
|
|
@ -136,7 +136,11 @@ class Model:
|
|||
if rnd.id == round_id:
|
||||
return rnd
|
||||
raise KeyError("Round not found")
|
||||
|
||||
|
||||
def get_round_index(self, round_id: str) -> int:
|
||||
camp = self.get_campaign_by_round(round_id)
|
||||
return camp.get_round_index(round_id)
|
||||
|
||||
def remove_player(self, player_id: str):
|
||||
del self.players[player_id]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue