Skip to content

Commit

Permalink
Solve issue half pot
Browse files Browse the repository at this point in the history
  • Loading branch information
aypee19 committed Jan 12, 2021
1 parent c33cd6f commit 13f67a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rlcard/games/nolimitholdem/round.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def get_nolimit_legal_actions(self, players):
full_actions.remove(Action.RAISE_HALF_POT)

# Can't raise if the raise is smaller than pot
if int(self.dealer.pot / 2) + player.in_chips <= max(self.raised):
if Action.RAISE_HALF_POT in full_actions and \
int(self.dealer.pot / 2) + player.in_chips <= max(self.raised):
full_actions.remove(Action.RAISE_HALF_POT)

# If the current player has no more chips after call, we cannot raise
Expand Down

0 comments on commit 13f67a3

Please sign in to comment.