it can't be high and low in a straight, but it can be high or low in a hand - so A2345 and TJQKA could both be valid straights.
If an ace is given value 1 (i.e. aces are low), then i can start increment-testing my card-values from 1, it it's high, then I can assume a value of 14, and expect it at the end of any straights - but if it's simultaneously 1 and 14, I'm going to need to do some special coding for it (which I'd rather avoid, but which looks unavoidable at the mometn)
a-j is that bit-shifting you're doing there? That's not a bad idea at all - any hand could be held as a 52 bit bitmask. The only problem is squeezing in cards of the same value but different suits...
|