no_teg.tourneys package#
Submodules#
no_teg.tourneys.round_robin module#
- class no_teg.tourneys.round_robin.Round_Robin(game)[source]#
Bases:
Tourney
A subclass of Tourney to represent a round robin tournament.
Supports any number of players and each player plays eachother once.
Methods
add_player
(player)Adds a player or team to the tournament.
add_players
(players)Sets the players or teams of the tournament.
get_matchups
()Returns the tournaments matchups.
input_result
(matchup_id, away_score, home_score)Inputs the result of concluded matchup.
Prints the tournament matchups.
Prints just the concluded tournament matchups.
randomize_matchups
()Randomizes the order of the players.
start
()Starts the tournament by initializing all the matchups.
- input_result(matchup_id, away_score, home_score, extra_stats=[])[source]#
Inputs the result of concluded matchup.
Function specifics differ per tournament subclass.
- Parameters:
None –
- Return type:
None
- print_matchups()[source]#
Prints the tournament matchups.
Function specifics differ per tournament subclass.
- Parameters:
None –
- Return type:
None
no_teg.tourneys.single_elimination module#
- class no_teg.tourneys.single_elimination.Single_Elimination(game)[source]#
Bases:
Tourney
A subclass of Tourney to represent a single elimination tournament.
Currently only supports tournaments with the amount of players being a power of 2.
Methods
add_player
(player)Adds a player or team to the tournament.
add_players
(players)Sets the players or teams of the tournament.
get_matchups
()Returns the tournaments matchups.
input_result
(matchup_id, away_score, ...)Inputs the result of concluded matchup.
Prints the tournament matchups.
Prints just the concluded tournament matchups.
randomize_matchups
()Randomizes the order of the players.
start
()Starts the tournament by initializing all the matchups.
- input_result(matchup_id, away_score, home_score, stats)[source]#
Inputs the result of concluded matchup.
- Parameters:
matchup_id (int) – the id corresponding to the matchup in which the score is being inputted
away_score (int) – the score of the away team
home_score (int) – the score of the home team
extra_stats (list, optional) – the extra stats for the game the tournament is managing
- Return type:
None
- print_matchups()[source]#
Prints the tournament matchups.
Function specifics differ per tournament subclass.
- Parameters:
None –
- Return type:
None