whist_core.game.legal_checker¶
Checks the legality of a move.
Module Contents¶
Classes¶
Static legal checker. |
- class whist_core.game.legal_checker.LegalChecker¶
Static legal checker.
- static check_legal(hand: whist_core.cards.card_container.UnorderedCardContainer, card: whist_core.cards.card.Card, first: whist_core.cards.card.Card | None) bool¶
Checks if move is legal. :param hand: of the current player :param card: the card which should be played next :param first: the first played card, can be None if no card has been played :return: True if legal else false