コード例 #1
0
ファイル: test_casino.py プロジェクト: kriegsmarine/gbf-bot
 def test_is_straight(self):
     poker = Poker()
     poker.new_game(['S6', 'D2', 'H3', 'C4', 'C5'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'D2', 'H3', 'C4', 'C5'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'DJ', 'HQ', 'CK', 'CT'])
     assert poker.is_straight() == True
     poker.new_game(['SA', 'DJ', 'HQ', 'CK', 'C9'])
     assert poker.is_straight() == False
     poker.new_game(('S2', 'D2', 'H3', 'C3', 'C5'))
     assert poker.is_straight() == False
コード例 #2
0
 def test_is_straight(self):
     poker = Poker()
     poker.new_game(["S6", "D2", "H3", "C4", "C5"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "D2", "H3", "C4", "C5"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "DJ", "HQ", "CK", "CT"])
     assert poker.is_straight() == True
     poker.new_game(["SA", "DJ", "HQ", "CK", "C9"])
     assert poker.is_straight() == False
     poker.new_game(("S2", "D2", "H3", "C3", "C5"))
     assert poker.is_straight() == False