Exemplo n.º 1
0
 def test_Structure_pot_limit(self):
     """Test a Limit Structure class"""
     ante = 0
     blinds = [10,20]
     structure = Structure(Structure.POT_LIMIT, ante=ante, blinds=blinds)
     self.assertIsNotNone(structure)
     self.assertFalse(structure.is_limit())
     self.assertTrue(structure.is_pot_limit())
     self.assertFalse(structure.is_no_limit())
     self.assertEqual(structure.get_ante(), ante)
     self.assertListEqual(structure.get_blinds(), blinds)
     # minimum bet should be big blind for all rounds
     betting_round = 1
     self.assertEqual(structure.get_minimum_bet(betting_round=betting_round),
                      max(blinds))
Exemplo n.º 2
0
 def test_Structure_limit(self):
     """Test a Limit Structure class"""
     ante = 10
     blinds = [50,100]
     min_bets = [100,100,200,200]
     structure = Structure(Structure.LIMIT, ante=ante,
                           blinds=blinds, bet_sizes=min_bets)
     self.assertIsNotNone(structure)
     self.assertTrue(structure.is_limit())
     self.assertFalse(structure.is_pot_limit())
     self.assertFalse(structure.is_no_limit())
     self.assertEqual(structure.get_ante(), ante)
     self.assertListEqual(structure.get_blinds(), blinds)
     betting_round = 1
     self.assertEqual(
         structure.get_minimum_bet(betting_round=betting_round),
         min_bets[betting_round-1])