Exemplo n.º 1
0
 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}
Exemplo n.º 2
0
def test_deck52():
    all_cards = Card.deck52()
    assert len(all_cards) == 52
Exemplo n.º 3
0
def test_parse_all_deck():
    for card in Card.deck52():
        assert card.same_as(Card.parse(str(card)))