Where to start writing a card game?,
Members - Reputation: 122
Posted 27 August 2001 - 07:40 AM
Members - Reputation: 100
Posted 27 August 2001 - 07:43 AM
"I''''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''''Urden
Members - Reputation: 215
Posted 27 August 2001 - 10:59 AM
Here is some information on using the standard cards32.dll I believe it is what most card games use. It''s purpose is to draw the cards where you tell it too.
The rest of the stuff are just problems for you to figure out your own logical solution to. There are multiple ways to solve each.
For example, many (most?) card games store the deck as an array of integers from one to 52, each number representing a card.
1 - Ace of spades
2 - Ace of clubs
3 - ace of hearts
4 - ace of diamonds
5 - two of spades
i think you get the point. By using that particular method, the pip value (number) of the card is found by seeing how many times 4 goes into the number evenly, plus one.
and the suit is found by checking the remainder of the number divided by 4.
Shuffling then comes down to randomly switching the cards. In VB it is simply done by:
For currentcard=1 to 52
if you''ve done much programming, then figuring the rest out shouldn''t be too hard. If you havn''t done programming before, then I suggest forgetting about a card game, and go out and buy a programming book, read it (doing all the examples), read it again, read it again, read it again... And then coming back to write the card game.
Hope that helps you some.
[Insert Witty Signature Here]