Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update env.py #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update env.py #70

wants to merge 1 commit into from

Conversation

borgr
Copy link
Collaborator

@borgr borgr commented Feb 25, 2025

Poker prevent decreasing bet with [bet x]

Poker prevent decreasing bet with [bet x]
@borgr borgr requested a review from LeonGuertler February 25, 2025 14:49
if amount >= self.state.game_state["current_bet"]:
return "bet", amount
else:
return "invalid_bet", None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should also set invalid move with a reason ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm just saw below haha

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I still think it isn't right to do this in the parsing function

Copy link
Contributor

@DylanASHillier DylanASHillier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as is, but would prefer to move the change from the parse function to the process fucntion

@@ -245,13 +248,20 @@ def _process_betting_action(self, player_id: int, action: str):
action_type, bet_amount = self._parse_action(action)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think you should do the check here, next to the other validity code... but otherwise this of course makes sense as a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants