コード例 #1
0
ファイル: testHands.py プロジェクト: JohnBrod/PokerBots
 def testJ_NoDuplicatesInStraight(self):
     '''no duplicate faces in a straight'''
     hand = cards('1C,2C,3C,4C,5H,7D,7H')
     self.assertEqual(straight(hand), cards('5H,4C,3C,2C,1C'))
コード例 #2
0
ファイル: testHands.py プロジェクト: JohnBrod/PokerBots
 def testH_UseTheHighestStraight(self):
     '''take the highest straight'''
     hand = cards('1D,2D,3C,4C,5H,6H')
     self.assertEqual(straight(hand), cards('6H,5H,4C,3C,2D'))
コード例 #3
0
ファイル: testHands.py プロジェクト: JohnBrod/PokerBots
 def testI_NoGapsAllowed(self):
     '''no gaps in a straight'''
     hand = cards('1D,2D,3C,4C,5H,7H')
     self.assertEqual(straight(hand), cards('5H,4C,3C,2D,1D'))
コード例 #4
0
ファイル: testHands.py プロジェクト: JohnBrod/PokerBots
 def testG_Straight(self):
     '''a straight'''
     hand = cards('1H,2C,3H,4S,5D')
     self.assertEqual(straight(hand), cards('5D,4S,3H,2C,1H'))
コード例 #5
0
ファイル: testHands.py プロジェクト: vatsaltrivedi/PokerBots
 def testJ_NoDuplicatesInStraight(self):
     '''no duplicate faces in a straight'''
     hand = cards('1C,2C,3C,4C,5H,7D,7H')
     self.assertEqual(straight(hand), cards('5H,4C,3C,2C,1C'))
コード例 #6
0
ファイル: testHands.py プロジェクト: vatsaltrivedi/PokerBots
 def testI_NoGapsAllowed(self):
     '''no gaps in a straight'''
     hand = cards('1D,2D,3C,4C,5H,7H')
     self.assertEqual(straight(hand), cards('5H,4C,3C,2D,1D'))
コード例 #7
0
ファイル: testHands.py プロジェクト: vatsaltrivedi/PokerBots
 def testH_UseTheHighestStraight(self):
     '''take the highest straight'''
     hand = cards('1D,2D,3C,4C,5H,6H')
     self.assertEqual(straight(hand), cards('6H,5H,4C,3C,2D'))
コード例 #8
0
ファイル: testHands.py プロジェクト: vatsaltrivedi/PokerBots
 def testG_Straight(self):
     '''a straight'''
     hand = cards('1H,2C,3H,4S,5D')
     self.assertEqual(straight(hand), cards('5D,4S,3H,2C,1H'))