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

Best hand returns all hands ranked #12

Closed
Deedasmi opened this issue Nov 25, 2021 · 0 comments · Fixed by #15
Closed

Best hand returns all hands ranked #12

Deedasmi opened this issue Nov 25, 2021 · 0 comments · Fixed by #15
Assignees

Comments

@Deedasmi
Copy link
Collaborator

Side pot logic requires I know not just the overall table winner, but the entire ranking of best hand to least best.

Desired api:

pub fn best_hands(hands: HashMap<i32, [cards; 7]>) -> Vec<Vec<(i32, [cards; 5]>

i32 is the account ID and tells me who the winner is, cards is obv the cards that won. Outer vec should be ordered be best ([0]) to worst([len-1]). Ties should be flattened to the inner vec, order doesn't matter.

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 a pull request may close this issue.

2 participants