I had to adjust the Card class to accomodate for the int though. Luckily we have unit tests in place to quickly review the changes. The exported members have not changed, but the internals have been rewritten to directly write to and read from the int bitmask. This way we can quickly implement the hand evaluator.
I will not tire you with the bitwise operations I do, just download the solution below and take a peek at the Card class. If you think what I do could be done better, feel free and let me know :).
For the hand evaluator itself I have found some articles on combinatorial operations and permutations, for that is exactly what we need. Who said Poker is a simple game?

Geen opmerkingen:
Een reactie posten