954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Event driven card game - need advice!

Hi
I'm beginning a new game project involving Event data cards. Most have common types of data. They fall broadly into three types: terrain, movement or fire. Although there are some special event cards or modifier cards but on the whole, similar data on the most part. Except the fire opportuninty cards, where only 1 data type is in common. They will be all part of same deck. However, I not sure how best to manage & store the data for gameplay purposes. Are arrays the answer, structs, enums ... something else. Thanks.

Spudgunner
Newbie Poster
3 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

I'd make an interface (ICard) and derive all cards from it. Possibly some abstract types for each category, then specific implementations for each card. I'd use List to hold each players hand, and a Queue for the deck.

Momerath
Nearly a Senior Poster
3,386 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
 
I'd make an interface (ICard) and derive all cards from it. Possibly some abstract types for each category, then specific implementations for each card. I'd use List to hold each players hand, and a Queue for the deck.

Thanks!

Spudgunner
Newbie Poster
3 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This maybe of some use...
http://deckofcards.codeplex.com/

DevMac
Newbie Poster
1 post since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

Thanks Devmac, I'll have a look at that link for inspiration. Although the cards I'm thinking of are not like regular playing cards which have a clearly defined logical pattern. The nearest comparison I can give are those "Magic The Gathering" cards (or Pokemon cards).

Spudgunner
Newbie Poster
3 posts since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: