-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGame.h
53 lines (46 loc) · 1.21 KB
/
Game.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
#pragma once
#include "MapLoader.h"
#include "Player.h"
#include "GameObservers.h"
class Game{
private:
MapLoader* maploader;
Map* map;
vector<Player*> allPlayers;
Deck* deck;
int* supplyBank;
string startingGameCountry;
const vector<string> allColors = { "red", "blue", "yellow", "green", "white" };
vector<Phase*> observers;
int playerMode;
vector<string>* actionsOfPLayer;
int playerTurn;
View* viewObserver;
public:
Game();
~Game();
void loadPlayer();
void createDeck();
void playerBid();
void draw6cards();
void showDeckHand();
void addSupply(int money);
void playerChooseColor(int nbOfPlayer);
void setPlayerMode(int playerMode);
void if2Players();
void setMap(Map* map);
void setStartingGameCountry();
void displayCountry();
void startGame();
void playerChooseAction(Player* playerTurn,vector<string>*);
void destroyGame();
void addSubscriber(Phase* observer);
void notify();
void setPlayerAction(int player, vector<string>* actions);
bool notAlreadyUsed(vector<string> colorUsed, string color);
bool verifyColor(vector<string> colorUsed, string colorChoose, int nbOfPlayer);
void computeScoreG();
void setObserver();
int nbOfCoin(int nbOfPlayer);
int nbOfTurn(int nbOfPlayer);
};