-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCardTen.cpp
59 lines (46 loc) · 1.13 KB
/
CardTen.cpp
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
#include "CardTen.h"
int CardTen::CardPrice = 0;
int CardTen::fees = 0;
Player* CardTen::p = NULL;
bool CardTen::IsBought = 0;
CardTen::CardTen(const CellPosition& pos) : Cards_9_11(pos) // set the cell position of the card
{
cardNumber = 10; // set the inherited cardNumber data member with the card number (9 here)
}
Card* CardTen::GetCopy(const CellPosition& pos)
{
return new CardTen(pos);
}
Player* CardTen::GetPlayer() {
return p;
}
int CardTen::GetCardPrice() {
return CardPrice;
}
void CardTen::SetPlayer(Player* player) {
p = player;
}
void CardTen::ReadCardParameters(Grid* pGrid)
{
Cards_9_11::ReadCardParameters(pGrid, CardPrice, fees, p, IsBought);
}
void CardTen::Apply(Grid* pGrid, Player* pPlayer)
{
Cards_9_11::Apply(pGrid, pPlayer, CardPrice, fees, p, IsBought);
}
bool CardTen::CheckInputValidity()
{
bool validity = Cards_9_11::CheckInputValidity(CardPrice, fees);
return validity;
}
void CardTen::Save(ofstream& outFile, ObjectType ObjType)
{
Cards_9_11::Save(outFile, ObjType, CardPrice, fees);
}
void CardTen::Load(ifstream& InFile)
{
Cards_9_11::Load(InFile, CardPrice, fees);
}
CardTen::~CardTen(void)
{
}