-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPlayer.h
74 lines (63 loc) · 1.82 KB
/
Player.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
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
#pragma once
#include "Orders.h"
#include "Map.h"
#include "Cards.h"
#include "Player.h"
#include "GameEngine.h"
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Hand;
class Orders;
class Territory;
class Card;
//all class need to have an assignment operator, and stream insertion operator.
class Player {
public:
Player(); // Default constructor
Player(string); //added
Player(int, string, vector<Territory*> territories, Hand* handCard, vector<Orders*> order); //Constructor
Player(const Player& p); //Copy constructor
Player& operator = (const Player&); //added
friend std::istream& operator>>(std::istream& in, Player& p);
friend std::ostream& operator<<(std::ostream &out, const Player &p);
bool operator == (const Player&);
bool operator != (const Player&);
~Player(); //Destructor
//atrributes
string name;
int id;
int reinforcementPool;
vector<Territory*> territory;
vector<Hand*> handCard;
vector<Orders*> orderList;
vector<Territory*> NeighbourT;
bool negotiate = false;
bool FinishedIssueOrder = false;
Player* enemy_no_attack;
GameEngine* Game;
vector<Player*> playerTruces;
//Methods
vector<Territory*> getTerritory();
vector<Territory*> toAttack();
vector<Territory*> toDefend();
vector<Orders*> getOrderList();
Hand* getCard();
void issueOrder();
string getName();
int getReinforcementPool();
void setReinforcementPool(int);
void setOrder(Orders*);
void setTerritory(Territory*);
void removeTerritory(int i);
void setName(string);
void setHand(Card* c);
void printOrder();
void printHandcard();
void Neighbour();
void Setis(int i)
void addTruce(Player*);
void removeAllTruces();
bool hasTruce(Player*);
};