A poker hand evaluator is problem #54 at Project Euler. [0] Peter Norvig has a solution there (which you can view after you submit your own correct solution) that taught me a lot about Python-style and how it differs from C++ (which was my mindset at the time).
Excluded was correct, if only indirectly: a straight is defined as five cards of consecutive value and aces are explicitly the highest (and not also the lowest) values, so the wheel is not a valid straight by the definition given.
1. Does it have a badge that says "build passing"?
2. Does it have a bunch of stars on GitHub?
3. Does it have a commit in the past week?
If so, wrap that in an npm package and publish it.
Otherwise, it's AbAnDoNwArE.
https://gist.github.com/mchampine/dca965226148dfd19d5e4d7f3d...
Most of it was done for a weekly Clojure programming challenge run by Eric Normand in his PurelyFunctional.tv newsletter. You can see all the entries at https://gist.github.com/ericnormand/fbc9b6386a66c1ece590930d...
Third party repo: https://github.com/tangentforks/TwoPlusTwoHandEvaluator
Original statement of license: https://forumserver.twoplustwo.com/showpost.php?p=1482536&po...
I’ve been using poker-eval for a few projects but it seems its now abandonware, with few updates out there.
I’m tempted to port it to Go and/or Rust to keep it alive, but I’m interested in what else people are using out there for poker hand evaluation.