def find_first_dealer(self): self.show_all = True self.deck.collect_shuffle() self.deck.deal(self.active_players_o, 1) highest = high_card([(pos, p.hand[0]) for pos, p in self.active_players.iteritems()]) self.dealer = highest[0]
def test_high_set(self): assert high_card([("foo", "3S"), ("bar", "JS")]) == ("bar", "JS")
def test_high_tie(self): assert high_card([("foo", "KD"), ("bar", "KS")]) == ('bar', 'KS') assert high_card([("foo", "KH"), ("bar", "KC")]) == ('foo', 'KH')
def test_high_single(self): assert high_card([("foo", "3S")]) == ("foo", "3S")