1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
class PokerCard {
enum SuitType {NO_SUIT, CLUBS, DIAMONDS, HEARTS, SPADES};
public:
// enum class SuitType {NO_SUIT, CLUBS, DIAMONDS, HEARTS, SPADES};
// enum SuitType {NO_SUIT, CLUBS, DIAMONDS, HEARTS, SPADES};
// explicit PokerCard (int, SuitType); // constructor initialize rank and suit
// enum SuitType {NO_SUIT, CLUBS, DIAMONDS, HEARTS, SPADES};
explicit PokerCard (); // constructor initialize rank and suit
int getRank() const; // retrieve card value
// SuitType getSuit() const; // retrieve card value
int getSuit() const; // retrieve card value
void setRank(int); // set card value
// void setSuit(SuitType); // set suit
int setSuit(int); // set suit
void DisplayCard();
private:
char Rank; // value of a card
// SuitType Suit; // suit of a card
int Suit; // suit of a card
};
// end of class PokerCard
|