void Deck::Shuffle(){ unsigned int sz = numCards; vector D; vector E; vector F; srand((unsigned)time(NULL)); unsigned int ra = 5 + (rand() % 3); for(unsigned int h = 0;h < ra; ++h) { *this = *this << (1 + (rand() % (sz/4))); D = *this / 2; E = D[0] / 2; F = D[1] / 2; D[1] = F[0] * F[1]; D[0] = E[0] * E[1]; *this = D[0] * D[1]; }}
I think it looks better, maybe it works better. I read on some other website about Blackjack Gold, they had this long list of features that made it more 'realistic gameplay'. So I guess I wanted to make my shuffle just a little more flexable than it was. That game also had a nice system where you could design your own stratagy method for playing, and let the computer run the hands. It would give you the obviously desired information of weither or not your stratagy paid off. I would like to do something like that if I keep this going, but I really dont know how to let that stuff be configured realtime. Either way, I am having fun.