-
Notifications
You must be signed in to change notification settings - Fork 0
/
CardOne.h
28 lines (23 loc) · 1.09 KB
/
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
bool check;
public:
CardOne(const CellPosition & pos); // A Constructor takes card position
void SetWalletAmount(int);
virtual void ReadCardParameters(Grid * pGrid); // Reads the parameters of CardOne which is: walletAmount
//for copy,cut,paste
CardOne(const CellPosition&pos,bool check,int amount);
virtual Card* GetCopy();
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
void Save(ofstream& OutFile, const CellPosition& startCellPos);
virtual void Load(ifstream& Infile);
virtual ~CardOne(); // A Virtual Destructor
};