whist_core.scoring.score

Result after one hand.

Module Contents

Classes

Score

Score of a hand being played.

class whist_core.scoring.score.Score(teams: list[whist_core.scoring.team.Team], scores: list[int], **data: Any)

Bases: pydantic.BaseModel

Score of a hand being played.

property winner: whist_core.scoring.team.Team

Returns the winner team. :rtype: Team

hand_score: dict
__getitem__(item)

Returns a specific hand score.

won(team: whist_core.scoring.team.Team) bool

Check if the team won that round. :param team: Team for which to check if has won. :type team: Team :return: True if won, else false :rtype: bool