Re:Show HN: A simple Poker API to calculate the winning hand/s
by exdsq on Sunday July 05, 2020 @08:23PM
(#23743477)
Is it not? The win criteria is well specified so just iterate downwards from the highest priority win until you find a match?
[ Parent
| on HN ]
Re:Show HN: A simple Poker API to calculate the winning hand/s
by Bnshsysjab on Sunday July 05, 2020 @09:09PM
(#23743724)
Sure, but that gets complicated when comparing two matching hands (flush vs flush, 2 pair vs 2pair). It’s more than a 50 line problem to solve.
Re:Show HN: A simple Poker API to calculate the winning hand/s
by exdsq on Monday July 06, 2020 @03:34AM
(#23745562)
Okay fair it’s more than 50 lines, I guess my definition of non-trivial is something you can’t quickly think of a design for. I’ll try it later and see if there’s some gotchas I can’t think of :)
Re:Show HN: A simple Poker API to calculate the winning hand/s
by 40four on Sunday July 05, 2020 @10:01PM
(#23743988)
I had the same initial reaction as the other person. Should be easy right? I think you’re right though, there are probably many more steps to getting this right than it seems on the surface.
I kind of want to take your 50 line challenge however :) I always loved playing poker, might be a fun exercise.