Exemple #1
0
 def test_4same(self):
     test=poker(['3D','4D','5D','6D','7D'],['3D','3S','3H','3C','KS'])
     self.assertEquals(test,'white-win')
Exemple #2
0
 def testhulu(self):
     test=poker(['3D','3S','3H','7D','7H'],['5D','6D','9D','QD','KD'])
     self.assertEquals(test,'white-win')
Exemple #3
0
 def testtie(self):
     test=poker(['3H','3D','5S','9C','KD'],['3H','3D','5S','9C','KD'])
     self.assertEquals(test,'tie')
Exemple #4
0
 def test_Straightflush(self):
     test=poker(['2H','3H','4H','5H','6H'],['3D','4D','5D','6D','7D'])
     self.assertEquals(test,'black-win')
Exemple #5
0
 def test_pair(self):
     test = poker(['3D', '3S', '6H', '9D', 'QC'], ['2H', '6C', '9D', 'JH', 'KD'])
     self.assertEquals(test, 'white-win')
Exemple #6
0
 def test_twopair(self):
     test=poker(['3D','3S','6H','7D','9H'],['5D','5H','9D','9H','KD'])
     self.assertEquals(test,'black-win')
Exemple #7
0
 def test_santioa(self):
     test=poker(['3D','3S','3H','7D','9H'],['5D','5H','9D','9H','KD'])
     self.assertEquals(test,'white-win')
 def one_wins(line):
     hand = line.strip().split()
     p1, p2 = hand[0:5], hand[5:]
     return 1 if poker([p1, p2]) == [p1] else 0
Exemple #9
0
 def one_wins(line):
     hand = line.strip().split()
     p1, p2 = hand[0:5], hand[5:]
     return 1 if poker([p1, p2]) == [p1] else 0