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

rec_tourney#

tournament type recommended

Type:

Tourney

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

get_labels()

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

set_rec_players(rec_players: int)[source]#

Sets the recommended amount of players.

Parameters:

rec_players (int) – the recommended amount of players

Return type:

None

set_rec_tourney(rec_tourney)[source]#

Sets the recommended tournament type.

Parameters:

rec_tourney (Tourney) – the recommended tournament type

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.

get_name()[source]#

” Returns the name of the player.

Parameters:

None

Returns:

self.name

Return type:

str

set_age(age)[source]#

Sets the age of the player.

Parameters:

age (int) – the age of the player

Return type:

None

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

players#

the players on the team

Type:

list of Player

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

add_players(players: list[Player])[source]#

Set the players of the team.

Parameters:

players (list of Player) – the players to be set on the team

Return type:

None

get_name()[source]#
get_players()[source]#
class no_teg.no_teg.Tourney(game)[source]#

Bases: object

A interface-like class to represent a tournament.

game#

the game the tournament is managing

Type:

Game

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.

get_matchups()

Returns the tournaments matchups.

input_result()

Inputs the result of concluded matchup.

print_matchups()

Prints the tournament matchups.

print_results()

Prints just the concluded tournament matchups.

randomize_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

randomize_matchups()[source]#

Randomizes the order of the players.

Parameters:

None

Return type:

None

start()[source]#

Starts the tournament by initializing all the matchups.

Function specifics differ per tournament subclass.

Parameters:

None

Return type:

None

no_teg.no_teg.example1()[source]#

Module contents#