whist_core.game.legal_checker
Checks the legality of a move.
Classes
Static legal checker. |
Module Contents
- class whist_core.game.legal_checker.LegalChecker
Static legal checker.
- static check_legal(hand, card, first)
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
- Parameters:
hand (whist_core.cards.card_container.UnorderedCardContainer)
card (whist_core.cards.card.Card)
first (Optional[whist_core.cards.card.Card])
- Return type:
bool