Evaluating Poker Hands

Found a really good challenge over on www.codewars.com. Evaluating poker hands. I opted to use C#’s dictionary feature to map dealt cards with numerical values that can be compared. The hardest part was remembering all the rules and evaluating all the edge cases – player wins on highest card when both players have 4 higher value cards the same (eg “JD TS 8C 4H 3D” vs “JH TC 8S 4D 2C“).

Leave a Reply

Your email address will not be published. Required fields are marked *