Пример #1
0
 def test_HighCardCombination(self):
     card1 = Poker.Card(figure=14, colour=0)
     card2 = Poker.Card(figure=2, colour=1)
     card3 = Poker.Card(figure=11, colour=3)
     card4 = Poker.Card(figure=9, colour=2)
     card5 = Poker.Card(figure=13, colour=1)
     mock_hand = Mock()
     mock_hand.cards = [card1, card2]
     tableCard = [card3, card4, card5]
     pointCounter = Poker.pointCounter()
     best, bestResultList = pointCounter.countBestResult(
         hand=mock_hand, tableCards=tableCard)
     self.assertEqual(best, Poker.GetResultName('High card'))
Пример #2
0
 def test_FlushCombination(self):
     card1 = Poker.Card(figure=7, colour=0)
     card2 = Poker.Card(figure=10, colour=1)
     card3 = Poker.Card(figure=12, colour=1)
     card4 = Poker.Card(figure=5, colour=1)
     card5 = Poker.Card(figure=13, colour=1)
     mock_hand = Mock()
     mock_hand.cards = [card1, card2]
     tableCard = [card3, card4, card5]
     pointCounter = Poker.pointCounter()
     best, bestResultList = pointCounter.countBestResult(
         hand=mock_hand, tableCards=tableCard)
     self.assertEqual(best, Poker.GetResultName('Flush'))