-
Notifications
You must be signed in to change notification settings - Fork 0
/
Card.h
77 lines (67 loc) · 1.46 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <iostream>
using namespace std;
class Card {
private:
Card();
public: virtual int getCardsPerCoin(int coins) = 0;
virtual string getName() = 0;
virtual void print(ostream& out) = 0;
class IllegalType : public exception {
const char* bean() const {
return "Invalid type";
}
};
class IllegalChain : public exception {
const char* bean() const {
return "Invalid chain";
}
};
};
class Blue : public Card {
public: Blue();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class Chili : public Card {
public: Chili();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class Stink : public Card {
public: Stink();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class Green : public Card {
public: Green();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class soy : public Card {
public: soy();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class black : public Card {
public: black();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class Red : public Card {
public: Red();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};
class garden : public Card {
public: garden();
int getCardsPerCoin(int coins);
string getName();
void print(ostream& out);
};