Ejemplo n.º 1
0
 def testFlushKittyZero(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "2"),
         Card("Club", "4"),
         Card("Hearts", "6"),
         Card("Hearts", "8")
     ], Card("Hearts", "10"), True)
     self.assertEqual(0, score)
Ejemplo n.º 2
0
 def testRightJack(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "4"),
         Card("Spade", "J"),
         Card("Club", "6"),
         Card("Club", "7")
     ], Card("Spade", "3"), False)
     self.assertEqual(1, score)
Ejemplo n.º 3
0
 def testFlushHandWithOutCut(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "2"),
         Card("Hearts", "4"),
         Card("Hearts", "6"),
         Card("Hearts", "8")
     ], Card("Club", "10"), False)
     self.assertEqual(4, score)
Ejemplo n.º 4
0
 def testCalculateScore2(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "4"),
         Card("Hearts", "5"),
         Card("Hearts", "6"),
         Card("Hearts", "6")
     ], Card("Hearts", "6"), True)
     self.assertEqual(26, score)
Ejemplo n.º 5
0
 def testCalculateScore1(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "7"),
         Card("Club", "8"),
         Card("Diamond", "8"),
         Card("Spade", "9")
     ], Card("Hearts", "6"), True)
     self.assertEqual(16, score)
Ejemplo n.º 6
0
 def testCalculateScore29Hand(self):
     hc = HandCalculator()
     score = hc.calculateScore([
         Card("Hearts", "J"),
         Card("Club", "5"),
         Card("Diamond", "5"),
         Card("Spade", "5")
     ], Card("Hearts", "5"), True)
     self.assertEqual(29, score)