I've just gone away and had a think about this, and think that using a bitmask is genius!
so each card value is assigned a bit i.e.
Code:
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][1] = Ace
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][1][ ] = Duece
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][1][ ][ ] = 3
[ ][ ][ ][ ][ ][ ][ ][ ][ ][1][ ][ ][ ] = 4
[ ][ ][ ][ ][ ][ ][ ][ ][1][ ][ ][ ][ ] = 5
[ ][ ][ ][ ][ ][ ][ ][1][ ][ ][ ][ ][ ] = 6
[ ][ ][ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ] = 7
[ ][ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ] = 8
[ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ] = 9
[ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ][ ] = 10
[ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] = Jack
[ ][1][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] = Queen
[1][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] = King
Then, all the cards in a hand are ORed into a hand array
[ ][ ][ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ] = 7
[ ][ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ] = 8
[ ][ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ] = 9
[ ][ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ][ ] = 10
[ ][ ][1][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] = Jack
[ ][ ][1][1][1][1][1][ ][ ][ ][ ][ ][ ] = All Cards
Now by finding the first 1 and the last one, and filling in the gaps, I should be able to make a mask.
[ ][ ][1][1][1][1][1][ ][ ][ ][ ][ ][ ] = Mask
Now if I XOR the mask and the card array, I should always get zero if there is a straight, or something else if not.
It also solves the roaming Ace problem too.