Problem 54149. Determine Poker Hand Winner
Solution Stats
Problem Comments
-
8 Comments
Our differences on the first 100 winds by each player are these:
1) hand #142 was awarded to player 1. But player 1 has nothing, while player 2 has 2 pair, so player 2 should have won.
2) hand #219 was awarded to player 1. But player 1 has a pair of 12's, while player 2 has 2 pair, so player 2 should have won.
Both hand1{142} and hand1{219} are straights with the ace coming down to function low (A 2 3 4 5}. I should have noted that in the rules since some poker games do not allow that, but many also do.
Thanks David, that fixed it. I never actually played poker, so I had to look up the rules. There are a lot of varieties!
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
25821 Solvers
-
344 Solvers
-
33 Solvers
-
827 Solvers
-
161 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!