-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGameObservers.h
48 lines (40 loc) · 1.17 KB
/
GameObservers.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
#pragma once
#include<unordered_map>
#include <string>
#include "Player.h"
#include "map.h"
#include "abstractGameObserver.h"
using namespace std;
class Continent;
class Country;
class Player;
class Phase : public abstractGameObserver {
private :
unordered_map<int, vector<string>> actionsPlayerTook;
public:
void notify(int playerNb, vector<string>* actionsOfPLayer);
void display();
void reset();
};
class View : public abstractview {
private:
vector<Player*> allplayers;
unordered_map<string,string> allCountryStats;
unordered_map<string, string> allContinentStats;
unordered_map<string, Continent*> allContinent;
unordered_map<string, Country*> allCountries;
unordered_map<int, int> playerPoint;
int playerWinner;
public:
void notify(string country, string playerColor);
void notifyPlayerPoints(int player, int point);
void notifyWinner(int player);
void updateContinent();
void displayContinentStats();
void displayCountryStats();
void displayStats();
void displayWin();
void setAllPlayers(vector<Player*> allplayers);
void setallContinent(unordered_map<string, Continent*> allContinents);
void setallCountry(unordered_map<string, Country*> allCountries);
};