:py:mod:`whist_core.game.trick` =============================== .. py:module:: whist_core.game.trick .. autoapi-nested-parse:: Trick implementation Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: whist_core.game.trick.Trick .. py:class:: Trick Bases: :py:obj:`pydantic.BaseModel` One round of where every player plays one card. .. py:property:: done :type: bool Is the trick done. :return: True if trick is done else false. :rtype: bool .. py:property:: winner :type: whist_core.game.player_at_table.PlayerAtTable Player how won the trick. :return: Player instance of the winner if the trick is done. Else raises TrickNotDoneWarning :rtype: Player .. py:attribute:: play_order :type: list[whist_core.game.player_at_table.PlayerAtTable] .. py:attribute:: stack :type: whist_core.cards.card_container.OrderedCardContainer .. py:attribute:: trump :type: whist_core.cards.card.Suit .. py:method:: play_card(player: whist_core.game.player_at_table.PlayerAtTable, card: whist_core.cards.card.Card) -> None One player plays one card. Which is put on top of the stack. :param player: Player who wants to play a card. :type player: Player :param card: Card which the player wants to play. :type card: Card :return: None if successful, else raises TrickDoneError if every player already played a card. Or NotPlayersTurnError if a player attempts to play card although it is not they turn. :rtype: None .. py:method:: dict(*args, **kwargs) Returns dictionary.