Skip to content

Commit

Permalink
Add draw pullup penalty preference.
Browse files Browse the repository at this point in the history
  • Loading branch information
teymour-aldridge committed Jan 27, 2025
1 parent 590cf37 commit c5490fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tabbycat/options/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,23 @@ class DrawPullupRestriction(ChoicePreference):
default = 'none'


@tournament_preferences_registry.register
class DrawPullupPenalty(IntegerPreference):
help_text = _("If using pull-ups, prefer which teams can be pulled up. "
"Two-team formats only. Has no effect on BP or intermediate brackets."
"Note: this applies a penalty (making solutions which do not satisfy this preference less\
likely to appear). If you want to entirely reject such draws, you should use the\
pullup restriction preference instead.")
verbose_name = _("Pullup penalty")
section = draw_rules
name = 'draw_pullup_penalty'
choices = (
('none', _("No penalty")),
('lowest_ds_rank', _("Prefer teams with a lower draw strength by rank")),
)
default = 'none'


@tournament_preferences_registry.register
class BPPullupDistribution(ChoicePreference):
help_text = _("In BP, how pullups are distributed. Only \"Anywhere\" is WUDC-compliant.")
Expand Down

0 comments on commit c5490fd

Please sign in to comment.