예제 #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 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())
예제 #3
0
 def testIsStraightAceHighAndDeuce(self):
     hand = FullHand(["2d", "kd"], ["qd", "as", "th", "4d", "js"])
     self.assertTrue(hand.is_straight())
예제 #4
0
 def testIsStraightAceLow(self):
     hand = FullHand(("as", "3s"), ("2d", "4c", "5c", "kd", "6c"))
     self.assertTrue(hand.is_straight())
예제 #5
0
    def testIsNotStraight(self):
        hand = FullHand(("as", "9s"), ("qs", "jd", "4s", "4h", "6c"))
        self.assertFalse(hand.is_straight())

        hand = FullHand(("qh", "4d"), ("as", "5s", "js", "10c", "9d"))
        self.assertFalse(hand.is_straight())
예제 #6
0
 def testIsStraight(self):
     hand = FullHand(("as", "js"), ("qd", "kc", "10c", "4h", "4h"))
     self.assertTrue(hand.is_straight())