display battle tie-break token

This commit is contained in:
Maxime Réaux 2026-02-18 11:15:53 +01:00
parent 818d2886f4
commit 23110383c2
9 changed files with 127 additions and 29 deletions

View file

@ -106,3 +106,18 @@ class TieResolver:
return ev.participant_id # None if confirmed draw
return None
@staticmethod
def was_tie_broken_by_tokens(
war: War,
context_type: ContextType,
context_id: str,
) -> bool:
for ev in reversed(war.events):
if (
isinstance(ev, TieResolved)
and ev.context_type == context_type
and ev.context_id == context_id
):
return ev.participant_id is not None
return False