Adding cards to a vector for computer card game
Posted
by
Tucker Morgan
on Game Development
See other posts from Game Development
or by Tucker Morgan
Published on 2012-04-16T01:08:42Z
Indexed on
2012/04/16
5:47 UTC
Read the original article
Hit count: 405
c++
|game-mechanics
I am writing a Card game that has a deck size of 30 cards, each one of them has to be a unique, or at least a another (new XXXX) statement in a .push_back function, into a vector. Right now my plan is to add them to a vector one at a time with four separate, depending on what deck type you choose, collections of thirty .push_back functions. If the collection of card is not up for customization, other than what one of the four suits you pick, is there a quicker way of doing this, seems kinda tedious, and something that someone would have found a better way of doing.
© Game Development or respective owner