Exemplo n.º 1
0
 def __init__ (self, cards) :
     '''
     Give the player random name
     '''
     #possible names
     names = ["Christian", "Erlend", "Ola", "Tommy Woa", "Merethe<3", "Benny", "Janis"]
     
     # set the deck of the player
     self.cards = cards
     self.points = Pointcalc_Poker.calculatePoints(cards)
     
     #set the random name
     self.name = names[randint(0, 6)]
Exemplo n.º 2
0
 def test_testCalculatePoints_testPair(self):
         self.assertEqual(Pointcalc_Poker.checkPair(self.cards), 112)
Exemplo n.º 3
0
 def test_testCalculatePoints_FourOfAKind_2(self):
     self.assertEqual(Pointcalc_Poker.checkFourOfaKind(self.cards), 0)    
Exemplo n.º 4
0
 def test_testCalculatePoints_FourOfAKind(self):
     global pokerCards
     self.assertEqual(Pointcalc_Poker.checkFourOfaKind(self.pokerCards), 160002)
Exemplo n.º 5
0
 def test_testCalculatePoints_StraightFlush(self):
     self.assertEqual(Pointcalc_Poker.checkStraightFlush(self.pokerCards), 480000)
Exemplo n.º 6
0
 def test_testCalculatePoints_ThreeOfAKind(self):
     self.assertEqual(Pointcalc_Poker.checkThreeOfaKind(self.pokerCards), 80040)
Exemplo n.º 7
0
 def test_testCalculatePoints_royalFLush(self):
     self.assertEqual(Pointcalc_Poker.checkRoyalFlush(self.pokerCards), 500000)
Exemplo n.º 8
0
 def test_testCalcualtePoints7(self):
     self.assertEqual(Pointcalc_Poker.checkStraight(self.pokerCards), 100004)
Exemplo n.º 9
0
 def test_testCalculatePoints_flush2(self):
     self.assertEqual(Pointcalc_Poker.calculatePoints(self.pokerCards2), 29)    
Exemplo n.º 10
0
 def test_testCalculatePoints_flush(self):
     self.assertEqual(Pointcalc_Poker.calculatePoints(self.pokerCards), 120000)
Exemplo n.º 11
0
 def test_testCalculatePoints_TestFullHouse(self):
         self.assertEqual(Pointcalc_Poker.checkFullHouse(self.cards), 140000)