avoid choic tiebreak when sector places are enough for remaining active tied participants

This commit is contained in:
Maxime Réaux 2026-03-18 10:48:29 +01:00
parent db78c6dacc
commit aa75a5b84f

View file

@ -203,8 +203,6 @@ class Pairing:
active = TieResolver.get_active_participants(
war, context, context.participants
)
if len(active) <= 1:
break
current_context = TieContext(
context_type=context.context_type,
context_id=context.context_id,
@ -213,9 +211,12 @@ class Pairing:
score_kind=context.score_kind,
sector_id=context.sector_id,
)
# natural or unbreakable draw
if not TieResolver.can_tie_be_resolved(
war, context, current_context.participants
# natural, unbreakable or acceptable (enough places) draw
if (
not TieResolver.can_tie_be_resolved(
war, context, current_context.participants
)
or len(active) <= places
):
war.events.append(
TieResolved(