• 11
• 14
• 13
• 10
• 11
• entries
72
38
• views
22281

# a journal entry

185 views

Hmm, perhaps I was influenced by outside sources without their disgression. Whatever it was it made me take my shuffle method, and redesign it to work with operator* along side of the operator/. So now I can split the deck another time easily and clearly in the code.
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.

There are no comments to display.