whist_core.scoring.score_card
Scores over several hands.
Classes
Collects the results of several hands. |
Module Contents
- class whist_core.scoring.score_card.ScoreCard
Bases:
pydantic.BaseModelCollects the results of several hands.
- hands: list[whist_core.scoring.score.Score] = []
- __len__()
Amount of hands played.
- property max: int
Returns the highest amount of hands won by either team. :rtype: int
- Return type:
int
- add_score(score)
Add the score of one hand. :param score: Score after one hand played :type score: Score :return: None :rtype: None
- Parameters:
score (whist_core.scoring.score.Score)
- Return type:
None
- score(team)
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
- Parameters:
team (whist_core.scoring.team.Team)
- Return type:
int
- won(team)
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
- Return type:
int
- _other_team(team)
- Parameters:
team (whist_core.scoring.team.Team)
- Return type: