예제 #1
0
 def testFindRunsZeroTwoAdjacent(self):
     hcr = HandCalculator()
     score = hcr.calculateRunScore([
         Card("Hearts", "2"),
         Card("Club", "A"),
         Card("Hearts", "Q"),
         Card("Spade", "8"),
         Card("Hearts", "10")
     ])
     self.assertEqual(0, score)
예제 #2
0
 def testRunofFive(self):
     hcr = HandCalculator()
     score = hcr.calculateRunScore([
         Card("Hearts", "A"),
         Card("Club", "2"),
         Card("Spade", "5"),
         Card("Diamond", "3"),
         Card("Club", "4")
     ])
     self.assertEqual(5, score)
예제 #3
0
 def testDoubleDoubleRun(self):
     hcr = HandCalculator()
     score = hcr.calculateRunScore([
         Card("Hearts", "A"),
         Card("Club", "2"),
         Card("Spade", "A"),
         Card("Diamond", "3"),
         Card("Club", "3")
     ])
     self.assertEqual(12, score)
예제 #4
0
 def testFindRunsThree(self):
     hcr = HandCalculator()
     score = hcr.calculateRunScore([
         Card("Hearts", "2"),
         Card("Club", "4"),
         Card("Hearts", "3"),
         Card("Spade", "8"),
         Card("Hearts", "10")
     ])
     self.assertEqual(3, score)