Quote:
There's nothing particularly wrong with this, but it's probably simpler to just have your cards be integers from 0 to 51. First 13 are clubs in order, then diamonds, hearts and spades. The rank of any card is i % 13 and the suit is i/4
When creating the hand strenght methods, I see it more simpler to just calculate for example the strenght of a pair from the rank itself no matter the suit. So I could do it accesing to the exact number in the array.
Same for the suits. Just acess to the exact array when evaluating flushes.
Altough this could takes me to duplicate problems and using the way you named could help a lot in this I guess.
I will see where it takes me and probably if I find dificulties I will look back at this advice
Quote:
You're making a PLO evaluator, right? So there are 6 ways to choose hole cards from your hand, and each has 10 ways to hit the board. I'm not sure what you get 21 from
Yes, but I was talking about a holdem hand in the example. I would do the same process for the 60 combinations in plo.
Appreciate the advices thanks!
P.D: Just tought right now of creating a total 52 deck cards array, having inside arrays of cards, each with his rank and suit.
That way I could keep the count and avoid duplicates easily, also eavluate strenght of hands easily. And generate the randoms easily too accesing to the deck array.
Last edited by Maroel; 10-15-2017 at 03:14 PM.