Exemple #1
0
 def make_dealer_move(self):
     if len(self.cards) == 0:
         return
     if Rulebook.check_dealer_hit(Rulebook.check_hand_value(self.cards)):
         self.cards.append(self.deck.draw_card())
         if Rulebook.check_bust(Rulebook.check_hand_value(self.cards)):
             self.end_hand()
             return
         self.update_view()
         self.make_dealer_move()
Exemple #2
0
 def test_cdh_dealer_not_hit_ace(self):
     self.assertFalse(Rulebook.check_dealer_hit("10 or 20"))
Exemple #3
0
 def test_cdh_dealer_not_hit(self):
     self.assertFalse(Rulebook.check_dealer_hit("17"))
Exemple #4
0
 def test_cdh_dealer_hit_ace(self):
     self.assertTrue(Rulebook.check_dealer_hit("3 or 13"))
Exemple #5
0
 def test_cdh_dealer_hit(self):
     self.assertTrue(Rulebook.check_dealer_hit("15"))