Skip to content

Commit

Permalink
Fix issue datamllab#183
Browse files Browse the repository at this point in the history
Former-commit-id: 6f1ad3d
  • Loading branch information
ruzhwei committed Nov 24, 2020
1 parent ebefa98 commit 162094e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rlcard/games/nolimitholdem/round.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def get_nolimit_legal_actions(self, players):
# If the current player has no more chips after call, we cannot raise
diff = max(self.raised) - self.raised[self.game_pointer]
if diff > 0 and player.in_chips + diff >= player.remained_chips:
return [Action.CALL, Action.FOLD]
return [Action.FOLD, Action.CALL]

return full_actions

Expand Down
2 changes: 1 addition & 1 deletion tests/games/test_nolimitholdem_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_all_in_rounds(self):

game.step(Action.CHECK)
game.step(Action.ALL_IN)
self.assertListEqual([Action.CALL, Action.FOLD], game.get_legal_actions())
self.assertListEqual([Action.FOLD, Action.CALL], game.get_legal_actions())
game.step(Action.CALL)
self.assertEqual(game.round_counter, 4)
self.assertEqual(200, game.dealer.pot)
Expand Down

0 comments on commit 162094e

Please sign in to comment.