Пример #1
0
 def test_payoffs_1(self):
     game = Game()
     game.init_game()
     game.step(Action.CALL)
     game.step(Action.RAISE_HALF_POT)
     game.step(Action.FOLD)
     self.assertTrue(game.is_over())
     self.assertEqual(2, len(game.get_payoffs()))
Пример #2
0
 def test_all_in_to_call(self):
     game = Game()
     game.init_chips = [50, 100]
     game.dealer_id = 0
     game.init_game()
     game.step(Action.CALL)
     game.step(Action.ALL_IN)
     game.step(Action.CALL)
     self.assertTrue(game.is_over())
Пример #3
0
 def test_payoffs_1(self):
     game = Game()
     np.random.seed(0)
     game.init_game()
     game.step('call')
     game.step(4)
     game.step('fold')
     self.assertTrue(game.is_over())
     self.assertListEqual([-2.0, 2.0], game.get_payoffs())
Пример #4
0
 def test_payoffs_2(self):
     game = Game()
     np.random.seed(0)
     game.init_game()
     game.step(Action.CALL)
     game.step(Action.RAISE_POT)
     game.step(Action.ALL_IN)
     game.step(Action.FOLD)
     self.assertTrue(game.is_over())
     self.assertEqual(2, len(game.get_payoffs()))