0

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.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Spudgunner
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<T> to hold each players hand, and a Queue<T> for the deck.

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<T> to hold each players hand, and a Queue<T> for the deck.

Thanks!

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).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.