Draft
Conversation
The `hand` property value of `EvaluatedHand` objects returned by the `evaluate` function now order matching cards by suit alphabetically (c, d, h, s) rather than the order they appeared in the provided hole card & community card arrays. BREAKING CHANGE
Reverts BREAKING CHANGE from previous commit
…emove value from type
mhuggins
commented
May 13, 2024
eefdf8a to
1437520
Compare
mhuggins
commented
May 13, 2024
src/__tests__/odds.test.ts
Outdated
Comment on lines
120
to
143
| // TODO: enable this once implementation works | ||
| it.skip('heads-up, all hole cards provided', () => { | ||
| const hands: Hand[] = [ | ||
| ['As', 'Ks', 'Kh', 'Tc'], | ||
| ['Ad', 'Kd', 'Qd', 'Js'], | ||
| ]; | ||
|
|
||
| expect(odds(hands, { ...omahaOptions, communityCards: ['Qd', 'Js', '8h'] })).toEqual([ | ||
| { wins: 45, ties: 900, total: 990, equity: 0.5 }, | ||
| { wins: 45, ties: 900, total: 990, equity: 0.5 }, | ||
| ]); | ||
| }); | ||
|
|
||
| // TODO: enable this once implementation works | ||
| it.skip('heads-up, all hole cards provided without community cards', () => { | ||
| const hands: Hand[] = [ | ||
| ['As', 'Ks', 'Kh', 'Tc'], | ||
| ['Ad', 'Kd', 'Qc', 'Jc'], | ||
| ]; | ||
|
|
||
| expect(odds(hands, { ...omahaOptions, communityCards: [] })).toEqual([ | ||
| { wins: 45, ties: 900, total: 990, equity: 0.5 }, | ||
| { wins: 45, ties: 900, total: 990, equity: 0.5 }, | ||
| ]); |
Member
Author
There was a problem hiding this comment.
Need to address this TODO
mhuggins
commented
May 13, 2024
src/odds.ts
Outdated
Comment on lines
+24
to
+28
| // TODO: this implementation is not making use of `minimumHoleCardsUsed` or `maximumHoleCardsUsed` | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| minimumHoleCardsUsed, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| maximumHoleCardsUsed, |
Member
Author
There was a problem hiding this comment.
Need to address this TODO
mhuggins
commented
May 13, 2024
Comment on lines
+43
to
+45
| // TODO: This approach won't work for games with many cards per hand, such as 5-card omaha, | ||
| // since such a hand could have multiple flushes. | ||
| const matchingMask = [ss, sc, sd, sh].find((mask) => CARD_RANK_TABLE[bigintKey(mask)] >= 5); |
Member
Author
There was a problem hiding this comment.
Need to address this TODO
Member
Author
|
TODO: update benchmarks before merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.