コード例 #1
0
ファイル: landlord.py プロジェクト: seokhohong/landlord_ai
 def test_bet_3(self):
     players = [LearningPlayer('v1')] * 3
     game = LandlordGame(players=players)
     game.play_move(BetMove(0))
     game.play_move(BetMove(3))
     self.assertFalse(game.is_round_over())
     self.assertTrue(game.is_betting_complete())
     self.assertTrue(game.get_bet_amount() == 3)
コード例 #2
0
ファイル: landlord.py プロジェクト: seokhohong/landlord_ai
 def test_bet_2(self):
     players = [LearningPlayer('v1')] * 3
     game = LandlordGame(players=players)
     game.play_move(BetMove(0))
     self.assertEqual(len(game.get_legal_moves()), 4)
     one_better = game.get_current_position()
     game.play_move(BetMove(1))
     self.assertFalse(game.is_round_over())
     self.assertFalse(game.is_betting_complete())
     game.play_move(BetMove(0))
     self.assertFalse(game.is_round_over())
     self.assertTrue(game.is_betting_complete())
     self.assertTrue(game.get_bet_amount() == 1)
     self.assertEqual(game.get_current_position(), one_better)