1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#ifndef PLAYING_CARD_HPP
#define PLAYING_CARD_HPP
class PlayingCard {
private:
enum Face_value {
Ace,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King
};
enum Suit {
Clubs,
Diamonds,
Hearts,
Spades
};
Face_value _face_value;
Suit _suit;
public:
PlayingCard( Suit suit, Face_value face_value ) : _face_value(face_value), _suit(suit)
{
}
Face_value getFaceValue() {return _face_value;}
Suit getSuit() {return _suit;}
bool operator< (const PlayingCard& rhs); //function prototype
bool operator> (const PlayingCard& rhs); //function prototype
bool operator== (const PlayingCard& rhs); //function prototype
bool operator!= (const PlayingCard& rhs); //function prototype
};
#endif
|