unifomise tiebreak icons + refacto presenter
This commit is contained in:
parent
0081e52e9a
commit
3d0d7874e3
10 changed files with 185 additions and 165 deletions
|
|
@ -486,3 +486,26 @@ class TieResolver:
|
|||
continue
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def participant_spent_token(
|
||||
war: War,
|
||||
context_type: ContextType,
|
||||
context_id: str,
|
||||
sector_id: str | None,
|
||||
war_participant_id: str,
|
||||
) -> bool:
|
||||
if context_type == ContextType.CHOICE and sector_id is None:
|
||||
return False
|
||||
for ev in war.events:
|
||||
if not isinstance(ev, InfluenceSpent):
|
||||
continue
|
||||
if ev.context_type != context_type:
|
||||
continue
|
||||
if ev.context_id != context_id:
|
||||
continue
|
||||
if ev.sector_id != sector_id:
|
||||
continue
|
||||
if ev.participant_id == war_participant_id:
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue