no_teg package#
Submodules#
no_teg.no_teg module#
- class no_teg.no_teg.Game[source]#
Bases:
object
A class to represent a game.
…
- name#
name of the game
- Type:
str
- rec_players#
amount of players recommended
- Type:
int
- set_name(name):
Sets the name of the game.
- set_rec_players(rec_players):
Sets the recommended amount of players.
- set_rec_tourney(rec_tourney):
Sets the recommended tournament type.
- set_labels(labels):
Sets the labels for additional stat tracking for the game.
- get_labels():
Gets the labels for the game.
Methods
Gets the labels for the game.
set_labels
(labels)Sets the labels for additional stat tracking for the game.
set_name
(name)Sets the name of the game.
set_rec_players
(rec_players)Sets the recommended amount of players.
set_rec_tourney
(rec_tourney)Sets the recommended tournament type.
- get_labels()[source]#
Gets the labels for the game.
- Parameters:
None –
- Returns:
self.labels – the labels for additional stat tracking
- Return type:
list of str
- set_labels(labels: list[str])[source]#
Sets the labels for additional stat tracking for the game.
- Parameters:
labels (list of str) – the labels for additional stat tracking
- Return type:
None
- set_name(name: str)[source]#
Sets the name of the game.
- Parameters:
name (str) – the name of the person
- Return type:
None
- class no_teg.no_teg.Player(name)[source]#
Bases:
object
A class to represent a player.
…
- name#
the name of the player
- Type:
str
- age#
the age of the player
- Type:
int
- set_age(age):
sets the age of the player
- get_name():
returns the name of the player
Methods
get_name
()"
set_age
(age)Sets the age of the player.
- class no_teg.no_teg.Team(name: str)[source]#
Bases:
object
A class to represent a Team of Players.
…
- name#
the name of the team
- Type:
str
- add_player(player):
adds a player to the team
- add_players(players):
sets the players of the team
- get_name():
returns the name of the team
- get_players():
returns the players of the team
Methods
add_player
(player)Adds a player to the team.
add_players
(players)Set the players of the team.
get_name
get_players
- add_player(player: Player)[source]#
Adds a player to the team.
- Parameters:
player (Player) – the player to be added
- Return type:
None
- class no_teg.no_teg.Tourney(game)[source]#
Bases:
object
A interface-like class to represent a tournament.
…
- players#
the players or teams that the tournament is managing
- Type:
list of Player/Team
- matchups#
the matchups and associated data
- Type:
dict of {int : dict}
- add_player(player):
adds a player or team to the tournament
- add_players(players):
sets the players or teams of the tournament
- randomize_matchups():
randomizes the order of the players
- start():
starts the tournament by initializing all the matchups
- input_result():
inputs the result of concluded matchup
- get_matchups():
returns the tournament matchups
- print_matchups():
prints the tournament matchups
- print_results():
prints just the concluded tournament matchups
Methods
add_player
(player)Adds a player or team to the tournament.
add_players
(players)Sets the players or teams of the tournament.
Returns the tournaments matchups.
Inputs the result of concluded matchup.
Prints the tournament matchups.
Prints just the concluded tournament matchups.
Randomizes the order of the players.
start
()Starts the tournament by initializing all the matchups.
- add_player(player: Player / Team)[source]#
Adds a player or team to the tournament.
- Parameters:
player (Player / Team) – the player or team to be added
- Return type:
None
- add_players(players: list[Player / Team])[source]#
Sets the players or teams of the tournament.
- Parameters:
players (list of Player / Team) – the players or teams to be set in the tournament
- Return type:
None
- get_matchups()[source]#
Returns the tournaments matchups.
- Parameters:
None –
- Returns:
self.matchups
- Return type:
dict of {int : dict}
- input_result()[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
- print_results()[source]#
Prints just the concluded tournament matchups.
Function specifics differ per tournament subclass.
- Parameters:
None –
- Return type:
None