whist_core.scoring.score_card

Scores over several hands.

Module Contents

Classes

ScoreCard

Collects the results of several hands.

class whist_core.scoring.score_card.ScoreCard

Bases: pydantic.BaseModel

Collects the results of several hands.

property max: int

Returns the highest amount of hands won by either team. :rtype: int

hands: list[whist_core.scoring.score.Score] = []
__len__()

Amount of hands played.

add_score(score: whist_core.scoring.score.Score) None

Add the score of one hand. :param score: Score after one hand played :type score: Score :return: None :rtype: None

score(team: whist_core.scoring.team.Team) int

Getter for how many hands have been won by a team. :param team: for whom to look :type team: Team :return: Amount of hands won. :rtype: int

won(team) int

Check if the team won more hands. :param team: Team for which to check. :type team: Team :return: 1 if the team won more hands. 0 if they lost as many as they won. -1 if the lost more games than won. :rtype: int

_other_team(team: whist_core.scoring.team.Team) whist_core.scoring.team.Team