Aller au contenu

round.py

Round

Model for round. All rounds have matches associated with them and are associated with a tournament.

Attributes:

Name Type Description
round_number int

Ordered round number within the tournament.

tournament_id int

Unique id of the parent tournament.

id_num int

Unique id of this round.

matches dict

All matches associated with this round.

__init__(self, round_number, tournament_id, id_num) special

Constructor for Round.

Parameters:

Name Type Description Default
round_number int

Ordered round number within the tournament.

required
tournament_id int

Unique id of the parent tournament.

required
id_num int

Unique id of this round.

required
Source code in models/round.py
def __init__(self, round_number: int, tournament_id: int, id_num: int):
    """Constructor for Round.

    Args:
        round_number (int): Ordered round number within the tournament.
        tournament_id (int): Unique id of the parent tournament.
        id_num (int): Unique id of this round.
    """

    self.round_number = round_number
    self.tournament_id = tournament_id
    self.id_num = id_num

    self.matches = {}