Poker currently computes a map of rank occurrences and sorts its values ascending in order to check for full house, four of a kind, ...
That means that for a hand like (2,2,2,3,3), the sorted list is (2,3). Unfortunately the first value out of that list is checked for equality with 3 for full house, while it should be the other way around. This PR fixes that behaviour by sorting the list in descending order instead, allowing players to win mel with two pair, full house and four of a kind.
Poker currently computes a map of rank occurrences and sorts its values ascending in order to check for full house, four of a kind, ...
That means that for a hand like (2,2,2,3,3), the sorted list is (2,3). Unfortunately the first value out of that list is checked for equality with
3
for full house, while it should be the other way around. This PR fixes that behaviour by sorting the list in descending order instead, allowing players to win mel with two pair, full house and four of a kind.