I am trying to make a card class that has a bunch of functions to make it possible for the AI to judge what cards can be played. The card game I am working on at the moment is Rummy by order of my brother. I made a 3 pointer instances of my card class. I think that I will use these to point at other instances and judge whether a card can be played or not. The problem is is that I am a fail at pointers so this whole section is completely useless unless I can figure out how to do this. So far, I have figured out how to declare them.

Card *test1;//I think that these will be able to point at other instances.
Card *test2;
Card *test3;//there are only 3 cards at most needed in each time you play down a card in Rummy


7 Years
Discussion Span
Last Post by jonsca

Why not make some arrays of Card objects? You could have 3 arrays (or lists or vectors, etc.), one for the deck, one for the hand of the player, and one for the active meld. I know you've done some work on this already, so those are just suggestions.

This question has already been answered. 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.