display pairing results in choice table
This commit is contained in:
parent
9e602e8ca4
commit
4396b15c3a
9 changed files with 194 additions and 12 deletions
|
|
@ -132,6 +132,18 @@ class Round:
|
|||
def get_battle(self, sector_id: str) -> Battle | None:
|
||||
return self.battles.get(sector_id)
|
||||
|
||||
def get_battle_for_participant(
|
||||
self,
|
||||
campaign_participant_id: str,
|
||||
) -> Battle | None:
|
||||
for battle in self.battles.values():
|
||||
if (
|
||||
battle.player_1_id == campaign_participant_id
|
||||
or battle.player_2_id == campaign_participant_id
|
||||
):
|
||||
return battle
|
||||
return None
|
||||
|
||||
def has_battle_with_sector(self, sector_id: str) -> bool:
|
||||
return any(bat.sector_id == sector_id for bat in self.battles.values())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue