Repository navigation
Expand file tree
/
Copy pathCard.h
More file actions
85 lines (76 loc) · 1.75 KB
/
Copy pathCard.h
File metadata and controls
85 lines (76 loc) · 1.75 KB
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
78
79
80
81
82
83
84
85
#pragma once
#include <vector>
class OrderedDeck;
class Player;
class Card
{
public:
enum CardTypes
{
NULL_TYPE = -1,
TREASURE_TYPE = 0x01,
VICTORY_TYPE = 0x02,
ACTION_TYPE = 0x04,
ATTACK_TYPE = 0x08,
REACTION_TYPE = 0x16,
CURSE_TYPE = 0x32,
ACTION_ATTACK_TYPE = ACTION_TYPE | ATTACK_TYPE,
ACTION_REACTION_TYPE = ACTION_TYPE | REACTION_TYPE
};
enum CardIDs
{
NULL_CARD = -1,
ADVENTURER_CARD = 0,
BUREAUCRAT_CARD,
CELLAR_CARD,
CHANCELLOR_CARD,
CHAPEL_CARD,
COPPER_CARD,
COUNCIL_ROOM_CARD,
CURSE_CARD,
DUCHY_CARD,
ESTATE_CARD,
FEAST_CARD,
FESTIVAL_CARD,
GARDENS_CARD,
GOLD_CARD,
LABORATORY_CARD,
LIBRARY_CARD,
MARKET_CARD,
MILITIA_CARD,
MINE_CARD,
MOAT_CARD,
MONEYLENDER_CARD,
PROVINCE_CARD,
REMODEL_CARD,
SILVER_CARD,
SMITHY_CARD,
SPY_CARD,
THIEF_CARD,
THRONE_ROOM_CARD,
VILLAGE_CARD,
WITCH_CARD,
WOODCUTTER_CARD,
WORKSHOP_CARD,
NUMBER_OF_CARDS
};
CardIDs cardID;
unsigned int deckIndex;
OrderedDeck *containerDeck;
Card();
Card(CardIDs cardID, unsigned int deckIndex, OrderedDeck *containerDeck);
~Card();
std::string name();
CardTypes cardType();
std::string description();
int getPrice(Card *card, Player *owner, std::vector<Player*> &otherPlayers);
int getPrice(Card *card, Player *owner, std::vector<Player*> *otherPlayers); // Can use NULL for Player pointers for default price
int getVPValue(Player *owner);
void playAction(Player *owner, std::vector<Player*> &otherPlayers);
void playTreasure(Player *owner, std::vector<Player*> &otherPlayers);
void playDuration(Player *owner, std::vector<Player*> &otherPlayers);
void setupCardOnBoard();
void printNameAndDescription(Player *player);
void sameDeckSwap(Card &otherCard);
void moveToAnotherDeck(OrderedDeck &deck);
};