Should be able to construct a lookup table using the existing hand-ranking system whenever the app starts. This will give faster hand-ranking (even though hand-ranking speed isn't really a problem).
There are ~2.5m distinct hands. It should be fairly simple to iterate over all possible hands and mapping each hand to a rank. There are 21 5 card hands that can be made from 7 cards, so to find the best hand, we just need to try each of the 21 hands and keep the highest ranked hand.
Should be able to construct a lookup table using the existing hand-ranking system whenever the app starts. This will give faster hand-ranking (even though hand-ranking speed isn't really a problem).
There are ~2.5m distinct hands. It should be fairly simple to iterate over all possible hands and mapping each hand to a rank. There are 21 5 card hands that can be made from 7 cards, so to find the best hand, we just need to try each of the 21 hands and keep the highest ranked hand.