Exemple #1
0
    def testOmahaNoLow(self):
	"""Test Omaha low hand ranking of hand without low with EightLowRanker."""
        ranker = EightLowRanker()
	hand = Omaha.Hand.fromString("QC AH TC 9C")
	board = Board.fromString("2H JH 4D 6H 3H")
	hand.setBoard(board)
	rank = ranker.rankHand(hand)
        self.assertIsNone(rank)
	hand = Omaha.Hand.fromString("QC AH TC 8C")
	board = Board.fromString("2H JH KD JS 3H")
	hand.setBoard(board)
	rank = ranker.rankHand(hand)
        self.assertIsNone(rank)
Exemple #2
0
    def testOmahaLow3(self):
	"""Test Omaha low hand ranking with EightLowRanker."""
        ranker = EightLowRanker()
	hand = Omaha.Hand.fromString("QC AH TC 5C")
	board = Board.fromString("2H JH 4D 6H KH")
	hand.setBoard(board)
	rank = ranker.rankHand(hand)
        self.assertIsNotNone(rank)
	self.assertEqual(rank.getType(), PokerRank.HIGH_CARD,
                         "rank = %s" % rank)
	self.assertEqual(rank.getPrimaryCardRank(), Rank.SIX,
			 "primaryCard = %s kickers = %s" % (rank.getPrimaryCardRank(),
							    rank.kickersAsString()))