SPEED card game card class setup help

4 views (last 30 days)
Yulisa Posada
Yulisa Posada on 24 Nov 2021
Commented: Walter Roberson on 24 Nov 2021
I`m having trouble setting up this class. please help
Cards Class
  1. Properties: Suits (string), Values (string)
  2. 52 Objects (one for each card)
  3. Methods: Shuffle Cards/Split Cards into Two Piles (Creates 52 Card Objects and returns two string arrays), Pick a Card/Remove it from the Player’s Pile (returns a card object and updates the GUI table that displays the cards played)
  6 Comments
Yulisa Posada
Yulisa Posada on 24 Nov 2021
How do i implement the objects in a class. Does that go in my function?
So lost on creating the 52 objects for each card
Walter Roberson
Walter Roberson on 24 Nov 2021
What properties does an individual card has? What methods can you apply to a card? As opposed to what properties a "deck" has.
A card obviously has Rank and Suit. Does it also have inherent Position, or is Position something associated with desks? Does an individual card have a "face up" / "face down" property? Does an individual card have a "undealt", "in a deck", "discarded" property ?

Sign in to comment.

Answers (0)

Categories

Find more on Card games in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!