Beispiel #1
0
 def test_get_soft(self):
     self.assertEquals(hand.get([1, 2]), hand.SOFT_2)
     self.assertEquals(hand.get([1, 5]), hand.SOFT_5)
     self.assertEquals(hand.get([1, 9]), hand.SOFT_9)
     self.assertEquals(hand.get([1, 2, 3]), hand.SOFT_5)
     self.assertEquals(hand.get([1, 10]), hand.BLACKJACK)
     self.assertEquals(hand.get([1, 2, 8]), hand.SOFT_10)
Beispiel #2
0
 def test_get_hard(self):
     self.assertEquals(hand.get([5, 8]), hand.HARD_13)
     self.assertEquals(hand.get([5, 8, 5]), hand.HARD_18)
     self.assertEquals(hand.get([1, 2, 9]), hand.HARD_12)
     self.assertEquals(hand.get([1, 2, 10]), hand.HARD_13)
     self.assertEquals(hand.get([5, 8, 10]), hand.BUST)
Beispiel #3
0
 def test_get_pair(self):
     self.assertEquals(hand.get([1, 1]), hand.PAIR_1)
     self.assertEquals(hand.get([8, 8]), hand.PAIR_8)