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
0
Newbie Poster
Recommended Answers
Jump to PostI'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.
All 4 Replies
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Spudgunner
0
Newbie Poster
DevMac
0
Newbie Poster
Spudgunner
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.