def selectCard(self, requested_suit_card): card = self._getCard(requested_suit_card) if card in Rules.allowedCards(requested_suit_card, self.cards): if len(self.cards) > 8: self._sendToPublic("cardPlaced", [self.uuid, None]) else: self._sendToPublic("cardPlaced", [self.uuid, card]) self.cards.remove(card) return card
def _getCard(self, requested_suit_card): return self.sendToClient( "selectCard", Rules.allowedCards(requested_suit_card, self.cards))