a journal entry

Published April 19, 2005
Advertisement
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.
Previous Entry More on twenty-one
Next Entry im writing in here
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Not bad.

1146 views

Zoned out.

1021 views

more

1101 views

Slow down champ.

917 views

I'll be back

880 views

Busy.

1036 views

oh teh noes!!

923 views
Advertisement