def new_turn(self): cards = Card.deck52() shuffle(cards) self.cards = { self.players[i]: cards[13 * i:13 * (i + 1)] for i in range(4) } self.tricks = [] self.trump = None self.current_trick = [] self.bids = [] self.bidder = 0 self.can_bid = {p: True for p in self.players}
def test_deck52(): all_cards = Card.deck52() assert len(all_cards) == 52
def test_parse_all_deck(): for card in Card.deck52(): assert card.same_as(Card.parse(str(card)))