whist_core.game.hand¶
Hand of whist
Module Contents¶
Classes¶
Hand of whist. |
- class whist_core.game.hand.Hand¶
Bases:
pydantic.BaseModelHand of whist.
- property current_trick¶
Returns the current trick.
- tricks: list[whist_core.game.trick.Trick] = []¶
- trump: whist_core.cards.card.Suit¶
- done() bool¶
Check if the hand is done. :return: True if the hand is done, else False :rtype: bool
- static deal(play_order: whist_core.game.play_order.PlayOrder) Hand¶
Deals the hand and starts the first trick. :return: the first trick :rtype: Trick
- next_trick(play_order: whist_core.game.play_order.PlayOrder) whist_core.game.trick.Trick¶
Starts the next trick. :return: the next trick :rtype: Trick
- dict(*args, **kwargs)¶
Returns as dictionary.
- model_dump(*, mode: str = 'python', include=None, exclude=None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool = True) Dict[str, Any]¶
Returns as dictionary.
- _winner_plays_first_card(play_order: whist_core.game.play_order.PlayOrder) whist_core.game.play_order.PlayOrder¶