View Single Post
Old 06-15-2008, 05:59 AM   #19 (permalink)
Anachostic
zB Programmer
Jr. Member
 
Anachostic's Avatar
 
Join Date: Jun 2007
Posts: 407
Reputation: 72
$zB: 87
Donate
Default

Here's some ideas I would consider when creating your card game.

Create an class for your cards. This class will have a property for color and value.

Put all your cards into a list object temporarily.

Make a loop and pull a random card from the list and put it in a Stack object. That's your shuffle. You will have one stack object for draw cards and one for discards.

During play, either take one card from the players card list and push it to the discard stack or pop one card off the draw stack and put it in the players card list.

When the player gets a Draw X, just pop the number of cards off the discard stack and put them in the players card list.

You're probably fine with the logical flow of the game, I'm just pointing out some of the .NET objects you'll want to use. Some of the terms I use might be unfamiliar to you if you've never programmed. You'll have to look up the terminology on your own.




Anachostic is offline   Reply With Quote