-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCardTen.h
39 lines (25 loc) · 1.16 KB
/
CardTen.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
#pragma once
#include "Card.h"
// [ CardTen ] Summary:
// Its Apply() Function: Decrements the fees of the card from the player currently standing on the card and gives it to the owner
// Its Parameters: The price of station and fees and owner
class CardTen : public Card
{
// CardTen Parameters:
static Player* owner; // owner of all cards from the CardNine class
static int price; // the price of the station
static int fees; // fees that will be deducted from the players and given to the owner
static int NumberOfCards;
public:
CardTen(const CellPosition& pos); // A Constructor takes card position
void setOwner(Player* pPlayer);
Player* getOwner() const;
int getPrice() const;
virtual void ReadCardParameters(Grid* pGrid); // Reads the parameters of CardNine which is: price and fees
virtual void Apply(Grid* pGrid, Player* pPlayer); // Applies the effect of CardNine on the passed Player
// by decrementing the player's wallet by the fees data member and adding it to the owners wallet
virtual void Save(ofstream& OutFile);
virtual void Load(ifstream& Infile);
virtual Card* Copy(Card* pCard);
virtual ~CardTen(); // A Virtual Destructor
};