-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCard.h
More file actions
40 lines (26 loc) · 742 Bytes
/
Card.h
File metadata and controls
40 lines (26 loc) · 742 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
#ifndef FINAL_CARD_H
#define FINAL_CARD_H
#include <iostream>
#include "Color.h"
#include "Contract.h"
#include "CardValue.h"
#include "Serializable.h"
using namespace std;
class Card : Serializable {
private:
CardValue::Type _value;
Color::Type _color;
static bool _deckSet;
static array<Card *, 52> _deck;
public:
Card(CardValue::Type value, Color::Type color);
CardValue::Type getValue() const;
Color::Type getColor() const;
bool isBigger(Card *rhs, Contract *c);
friend std::ostream &operator<<(std::ostream &os, const Card &c);
json serialize() override;
static void setDeck();
static array<Card *, 52> getDeck();
static Card* get(const int id);
};
#endif //FINAL_CARD_H