-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPlayer.h
100 lines (80 loc) · 2.4 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//
// Created by Noor on 2021-09-28.
//
#pragma once
#include <iostream>
#include <string>
#include <vector>
#include "Map.h"
#include "Cards.h"
#include "GameEngine.h"
#include "Orders.fwd.h"
#include "Player.fwd.h"
#include "PlayerStrategies.h"
#include <algorithm>
class GameEngine;
using namespace std;
class Hand;
class Player{
public:
PlayerStrategies *ps;
bool humanPlay;
// To check the player is an agressive player
bool AgressivePlayer = false;
//To check if the Neutral player is attacked
bool NeutralIsAttacked = false;
// To check if the neutral player exists
bool NeutralPlayer = false;
// To check if the neutral player exists
bool CheaterPlayer = false;
//constructors
Player();
int turns;
Player(string _name);
Player(Hand * hand);
void SetStrategy(PlayerStrategies*);
int ghostDeploys;
Player(const Player& p);
Player& operator=(const Player& p);
friend std::ostream& operator <<(std::ostream& stream,const Player& p);
Player(vector<Territory *> territoriesList, OrderList *orders, Hand *hand,string _name);
vector <Territory*> territoriesList;
vector<Order*> _OrderList;
string GetName();
OrderList* orders;
Hand* hand;
void AddToList(Order* o);
~Player();
bool negotiate = false;
Player *enemynottoattack;
void setNegotiate(Player *);
int reinforcement_pool;
void Setreinforcement_pool(int );
void RemoveTerritory(Territory * t);
void PrintToDefend();
void PrintToAttack();
void PrintNeighboors();
void IssueOrder();
Hand *getHand();
void SetHand(Hand h);
GameEngine * Game;
bool FinishedIssueOrder = false;
void SetGameEngine (GameEngine * game);
vector<Territory *> BubbleSort (vector<Territory *> array);
//Call it at the of each turn
void FillNeighboors ();
void SetID(int ID);
vector<Territory *> BubbleSort2 (vector<Territory *> &array);
string _name;
//METHODSS
vector<Territory *> toAttack();
void addTerritory(Territory *territory);
vector<Territory *> toDefend();
vector<Territory *> Neighboors;
//MUTATORS AND ACCESSORS
void setPlayer(Player *player);
OrderList *getOrdersList();
vector<Territory *> getTerritoriesList();
// has to be unique to each player
int id;
};