|
Cards are cards and decks are decks. You need only two classes to define a Deck. The Deck class and the Card class.
Let the game engine (the machine that enforces the game rules) manage different piles of cards. You'll be always set. Just move Cards from one Deck to others (which may start as an empty deck). Altough the other pile of cards don't have to be a Deck at all! They can be just simple arrays holding the cards you like (or don't like). And then let the engine deal with them when it's time to do so (like putting back in the original Deck for a new "try" within that round).
I'll write some code today. I'll be back. In the mean time, telll me what to do with cards that don't fit in any of the 4 rows. I don't know this game basically. Do I discard them on a new pile and reshuffle them later to try again?
__________________
|