예제 #1
0
 def testComplicatedIsStraightFlush(self):
     # Possible to have cards that compose a flush and a straight, but not
     # a straight flush:
     hand = FullHand(("9s", "10c"), ("js", "qs", "ks", "5d", "2s"))
     self.assertTrue(hand.is_straight())
     self.assertTrue(hand.is_flush())
     self.assertFalse(hand.is_straight_flush())
예제 #2
0
 def testIsNotFlush(self):
     hand = FullHand(("as", "9s"), ("qs", "jd", "4s", "6c", "8h"))
     self.assertFalse(hand.is_flush())
예제 #3
0
 def testIsFlush(self):
     hand = FullHand(("as", "9s"), ("qs", "js", "4s", "6c", "jd"))
     self.assertTrue(hand.is_flush())
예제 #4
0
 def testIsStraightFlush(self):
     hand = FullHand(("9s", "js"), ("10s", "ks", "qs", "9c", "jd"))
     self.assertTrue(hand.is_straight())
     self.assertTrue(hand.is_flush())
     self.assertTrue(hand.is_straight_flush())