From f1dcb9924480905271e53602956ff50b007b5ec4 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 28 Oct 2024 10:02:25 +0100 Subject: [PATCH] add new game format --- tournaments/models/enums.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tournaments/models/enums.py b/tournaments/models/enums.py index 0a3a1b9..2cf51dd 100644 --- a/tournaments/models/enums.py +++ b/tournaments/models/enums.py @@ -44,15 +44,18 @@ class FederalMatchCategory(models.IntegerChoices): TWO_SETS_DECISIVE_POINT_SUPER_TIE = 7, 'Two Sets with decisive point and super tie-break' TWO_SETS_FOUR_GAME_DECISIVE_POINT = 8, 'Two sets of four games with decisive point' NINE_GAMES_DECISIVE_POINT = 9, 'Nine games with decisive point' + TWO_SETS_OF_SUPER_TIE = 10, 'Two sets of Super Tie-Break decisive point' + SINGLE_SET = 11, 'Single set' + SINGLE_SET_DECISIVE_POINT = 12, 'Single set with decisive point' def last_set_is_tie_break(value): - if value == FederalMatchCategory.TWO_SETS_FOUR_GAME or value == FederalMatchCategory.TWO_SETS_FOUR_GAME_DECISIVE_POINT or value == FederalMatchCategory.TWO_SETS_SUPER_TIE or value == FederalMatchCategory.SUPER_TIE or value == FederalMatchCategory.MEGA_TIE or value == FederalMatchCategory.TWO_SETS_DECISIVE_POINT_SUPER_TIE: + if value == FederalMatchCategory.TWO_SETS_FOUR_GAME or value == FederalMatchCategory.TWO_SETS_FOUR_GAME_DECISIVE_POINT or value == FederalMatchCategory.TWO_SETS_SUPER_TIE or value == FederalMatchCategory.SUPER_TIE or value == FederalMatchCategory.MEGA_TIE or value == FederalMatchCategory.TWO_SETS_DECISIVE_POINT_SUPER_TIE or value == FederalMatchCategory.TWO_SETS_OF_SUPER_TIE: return True else: return False def max_number_of_sets(value): - if value == FederalMatchCategory.SUPER_TIE or value == FederalMatchCategory.MEGA_TIE or value == FederalMatchCategory.NINE_GAMES or value == FederalMatchCategory.NINE_GAMES_DECISIVE_POINT: + if value == FederalMatchCategory.SUPER_TIE or value == FederalMatchCategory.MEGA_TIE or value == FederalMatchCategory.NINE_GAMES or value == FederalMatchCategory.NINE_GAMES_DECISIVE_POINT or value == FederalMatchCategory.SINGLE_SET or value == FederalMatchCategory.SINGLE_SET_DECISIVE_POINT: return 1 else: return 3