toucan.mvp.calculator.players#

Module contaiming the Player class and auxiliary methods related to them.

Classes#

ToucanPlayer

Class representing a player of Toucan tournament sport.

Module Contents#

class toucan.mvp.calculator.players.ToucanPlayer(name: str, nickname: str)#

Class representing a player of Toucan tournament sport.

property name: str#

Access property for retrieving the name of the player.

Returns:
str

The name of the player.

property nickname: str#

Access property for retrieving the nickname of the player.

Returns:
str

The nickname of the player.

property points: List[int]#

Access property for retrieving the points of the player.

Returns:
List[int]

The list of points acquired per match.

property total_points: int#

Total number of points obtained by a player.

Returns:
int

Total number of points.

add_match_points(marks: List[int], discipline: toucan.mvp.calculator.discipline.ToucanDiscipline, position: str) None#

Compute and add the number of points acquired in a match.

Parameters:
evaluationList[int]

Marks obtained during the match.

disciplineToucanDiscipline

Sports discipline in which the marks were obtained.

positionstr

Player’s position in the match.

Notes

Computes the number of points and stores them inside the player’s record track (i.e. self._points).

get_team_score_contribution(marks: List[int], discipline: toucan.mvp.calculator.discipline.ToucanDiscipline) int#

Retrieve the score contribution of a player in a match.

Parameters:
evaluationList[int]

Marks obtained during the match.

disciplineToucanDiscipline

Sports discipline in which the marks were obtained.

Returns:
int

Score contributed to the team’s result.

add_bonus_points() None#

Add bonus points (i.e. 10) to the last match the player has played.

__str__() str#

Represent player information as string.

Returns:
str

String representation of the player.