-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.h
More file actions
52 lines (43 loc) · 644 Bytes
/
Card.h
File metadata and controls
52 lines (43 loc) · 644 Bytes
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
48
49
50
51
52
#ifndef CARD_H
#define CARD_H
#include <QtGlobal>
#include <QPair>
enum class Lead : quint8
{
Heards = 0,
Diamonds,
Clubs,
Spades
};
enum class Nominal : quint8
{
Two = 0,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King,
Ace
};
class Card
{
public:
explicit Card();
Card( Nominal nominal, Lead lead );
Lead GetLead() const;
Nominal GetNominal() const;
void SetLead(const Lead &lead);
void SetNominal(const Nominal &nominal);
private:
Lead _lead;
Nominal _nominal;
};
bool IsPair(const QPair<Card, Card> &hand);
bool IsOneLead(const QPair<Card, Card> &hand);
#endif // CARD_H