Re: 7 Card Hand Evaluators
Please could you all run this test on your hand evaluators and let me know the results:
int c1, c2, c3, c4, c5, c6, c7;
int handSetCounters[8] = {0,0,0,0,0,0,0,0};
for(c1 = 0; c1 < 52; c1++) {
for(c2 = c1 + 1; c2 < 52; c2++) {
for(c3 = c2 + 1; c3 < 52; c3++) {
for(c4 = c3 + 1; c4 < 52; c4++) {
for(c5 = c4 + 1; c5 < 52; c5++) {
for(c6 = c5 + 1; c6 < 52; c6++) {
for(c7 = c6 + 1; c7 < 52; c7++) {
CALCULATE RANK
CALCULATE SET ID (HIGH CARD TO STRAIGHT FLUSH)
INCREMENT HANDSETCOUNTERS[SET ID]
}}}}}}}
PRINT HANDSETCOUNTERS
If you could time the speed of your code in that scenario it would be most interesting! Also with a copy of your results (number of flushes etc incase your code is not designed to be 100% accurate).
Thanks for anyone that participates!
Tom
|