Well... long story short I had another thread about a month ago ? maybe a little later.. I went through the design process like.. 10 times and now I think I finally have my final design pretty pat..
I'm only having one simple issue.. I have a class Card that holds and int Face(1 ace, 2 two, 13 king) and int Suit (1 heart, 4 spade). Player hands are a list of card objects, same goes for the deck..
I want to pushback a copy of a card from the deck, and put it into my hand..Code:list <Card> Contents.. list <Card> Hand
It seems to work for one iteration but .. only one...Code:list <Card>::iterator i = Deck.Contents.begin(); **** iterate through list ***** this->Hand.pushback(*i);
Does anyone have any ideas? I've looked everywhere...
I tried allocating a new card new Card (suit, face) and trying to copy it over insert..
but I'm a little lost...
edited to add source.


Reply With Quote
Bookmarks