-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: main
Are you sure you want to change the base?
Update env.py #70
Conversation
Poker prevent decreasing bet with [bet x]
if amount >= self.state.game_state["current_bet"]: | ||
return "bet", amount | ||
else: | ||
return "invalid_bet", None |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
Poker prevent decreasing bet with [bet x]