2
I need to create a guy that matches a playing card. I tried it like this: Create a class for each suit and within the class create the properties of those classes that would be the cards themselves, like, Ace, Jack, King, Queen, Two and so on. But that’s where I’m picking up, because I’ll need to use this deck, like shuffle, draw a card, play and etc. Then comes the question: How do I create a card? The question is not wide (more than one answer) I just tried to explain what should happen, but the answer I wish would be: How I create a letter. Preferably not code, just an orientation on how to do.
I’ll try to do it now and see if I really understand or not and of course, posting everything I do.
– pnet
I just didn’t understand Enum for value.
– pnet
Enum value would be the value of the card: A, 2, 3, ... , Q, K.
– Felipe Avelar
I just wouldn’t use a vector with 52 positions.
– joaoeduardorf
@joaoeduardorf, what would I use instead of the array then? Dude, I can’t create a line of reasoning. I need to create a method Shuffle, for example, and of course, it should be random and I have no idea how to assemble my "deck" and shuffle. Okay.
– pnet
@Felipeavelar, really very abstract. It is worth what I commented to the joaoeduardorf.
– pnet