QUICK NOTE: The language in C++, though for code design don't think it matters that much. Just wanted to point that out if someone had a better design or language feature for me.
I wanted to see if I could get a review or some advice on my current plan and code design right now. This is my first time to really go and try to design classes, functions, and members that I'll need for a game or a project. So I wanted to try to start with a "simple" game that I've created before but wanted to try to plan out the code before I actually started working on the code. Even though I do want a "proper" design and want suggestions for that, my main thing is really is their anything glaring wrong that I will need to look out for? Anything else you see that I need to add? Even though I am sure when the coding does actually start I'll see some things that I need to add or change.
I didn't create a UML diagram for it, but really made a table for the classes I need and a table for each class listing each member and a brief description why I need it. I plan to try to create a simple UML diagram for it when I get the time to read up and find a good editor to help create a UML diagram.
Anyway here are my tables (just quick screenshots)
Hand Class: I tried to represent cards as real-life cards. A Hand is a collection of cards. After thinking about how cards are in real life I thought that we don't copy a card when you deal it. The card is moved. That for me made me store the collection of Cards as a vector of Card pointers. When Cards are moved from Hand to another the pointers will be copied and destroyed. I am unsure if this would be abusing the use of Dynamic Memory. When I Clear I am pretty sure this would ask for me to iterate through all the cards and delete the current iterator. I feel I could be abusing and not using Dynamic Memory in a proper place. Maybe some help here or help me visualize it different, as I only see cards moving and not actually be copying in real life?
Edited by Chad Smith, 20 April 2013 - 02:47 PM.