-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCardOne.h
29 lines (19 loc) · 961 Bytes
/
CardOne.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
#pragma once
#include "Card.h"
// [ CardOne ] Summary:
// Its Apply() Function: Decrements the value of the passing player’s wallet by a value
// Its Parameters: The Wallet Value to decrease --> put it as a "data member" and read it in ReadCardParameters()
class CardOne : public Card
{
// CardOne Parameters:
int walletAmount; // the wallet value to decrease from the player
public:
CardOne(const CellPosition & pos); // A Constructor takes card position
virtual void ReadCardParameters(Grid * pGrid); // Reads the parameters of CardOne which is: walletAmount
virtual void Apply(Grid* pGrid, Player* pPlayer); // Applies the effect of CardOne on the passed Player
// by decrementing the player's wallet by the walletAmount data member
virtual void Save(ofstream& OutFile);
virtual void Load(ifstream& Infile);
virtual Card* Copy(Card* pCard);
virtual ~CardOne(); // A Virtual Destructor
};