Exemple #1
0
class BlackJackDealer(Dealer):
    def __init__(self):
        Dealer.__init__(self)
        self.hand = BlackJackHand()

    def add_card(self, card):
        self.hand.add_card(card)

    def play_hand(self):
        if self.hand.value < 17:
            return BlackJackDecision.Hit
        if self.hand.is_soft():  # hit soft17
            return BlackJackDecision.Hit
        else:
            return BlackJackDecision.Stand
Exemple #2
0
 def __init__(self):
     Dealer.__init__(self)
     self.hand = BlackJackHand()