-
Notifications
You must be signed in to change notification settings - Fork 0
/
card.h
56 lines (42 loc) · 720 Bytes
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef CARD_H
#define CARD_H
// 点数
enum CardPoint {
Card_Begin,
Card_3,
Card_4,
Card_5,
Card_6,
Card_7,
Card_8,
Card_9,
Card_10,
Card_J,
Card_Q,
Card_K,
Card_A,
Card_2,
Card_SJ,
Card_BJ,
Card_End
};
// 花色
enum CardSuit {
Suit_Begin,
Diamond, // 方块
Club, // 梅花
Heart, // 红桃
Spade, // 黑桃
Suit_End
};
class Card {
public:
Card(CardPoint p = Card_Begin, CardSuit s = Suit_Begin);
Card(const Card &card);
bool operator<(const Card &card) const;
bool operator==(const Card &card) const;
public:
CardPoint point;
CardSuit suit;
};
#endif // CARD_H