-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure raises are called, fix edge cases with player options #85
Conversation
777e656
to
795b0bb
Compare
bors r+ |
85: Ensure raises are called, fix edge cases with player options r=charleskawczynski a=charleskawczynski This PR - Adds an assertion to ensure raises are called (via `all_raises_were_called`) - Fixes an edge cases where players are incorrectly given options when they shouldn't have any. For example, consider a heads-up game when the small blind player calls small blind (and is then all-in), the big blind has paid the blind, and has no action to make. In this case, the big blind was incorrectly given the option to check/raise/fold, which lead to downstream errors. - Adding `!action_required(br_leader)` to `cond3` helped fix an edge case (maybe helped with the same one above?) Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
Build failed: |
795b0bb
to
0037691
Compare
bors try |
tryBuild failed: |
0037691
to
0d2f4b1
Compare
bors try |
Codecov Report
@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 87.34% 87.56% +0.21%
==========================================
Files 8 8
Lines 901 949 +48
==========================================
+ Hits 787 831 +44
- Misses 114 118 +4
Continue to review full report at Codecov.
|
bors r+ |
85: Ensure raises are called, fix edge cases with player options r=charleskawczynski a=charleskawczynski This PR - Adds an assertion to ensure raises are called (via `all_raises_were_called`) - Fixes an edge cases where players are incorrectly given options when they shouldn't have any. For example, consider a heads-up game when the small blind player calls small blind (and is then all-in), the big blind has paid the blind, and has no action to make. In this case, the big blind was incorrectly given the option to check/raise/fold, which lead to downstream errors. - Adding `!action_required(br_leader)` to `cond3` helped fix an edge case (maybe helped with the same one above?) Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
Hopefully this is the last time... closes #59 |
Build failed: |
bors r+ |
This PR
all_raises_were_called
)!action_required(br_leader)
tocond3
helped fix an edge case (maybe helped with the same one above?)