-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard.h
43 lines (37 loc) · 1.1 KB
/
card.h
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
#ifndef CARD_H
#define CARD_H
#include <QString>
#include <vector>
#include "exception.h"
class Card
{
public:
static const unsigned int min_value, max_value, defaultValue;
static const QChar defaultColor;
static const unsigned int tenInt, jackInt, queenInt, kingInt, aceInt;
static const QChar Ten, Jack, Queen, King, Ace;
static const QString SpadesString, ClubsString, HeartsString, DiamondsString;
static const QString JackString, QueenString, KingString, AceString;
static const QChar SpadesColor, ClubsColor, HeartsColor, DiamondsColor;
static const QChar Colors[4];
Card(unsigned int=defaultValue, QChar=defaultColor);
Card(Card const&);
~Card();
bool operator==(const Card &) const;
bool operator!=(const Card &) const;
unsigned int getValue() const;
QChar getColor() const;
QString getTitle() const;
void setValue(const int);
void setColor(QChar);
bool setCard(const QString);
bool setCard(const Card);
Card getCard(const QString) const;
QString getStyleSheet() const;
QString getStringValue() const;
private:
unsigned int value;
QChar color;
Exception CardException;
};
#endif // CARD_H