-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
57 lines (52 loc) · 1.43 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
54
55
56
57
//
// Created by Jingchao Zhang on 2/26/2021.
//
#ifndef COMP345_WINTER2021_GAME_H
#define COMP345_WINTER2021_GAME_H
#include "Map.h"
#include "Player.h"
#include "Cards.h"
#include <vector>
#include <string>
class Game {
public:
Game();
~Game();
bool start();
bool startup();
void play();
void computeScore();
void claimWinner();
private:
int numOfPlayer;
Map* map;
vector<Player*> players;
Deck* deck;
Hand* hand;
int coinSupply;
int startRegionId;
unordered_map<string, int> armies; // color -> the number of armies supplied on the table
unordered_map<string, int> cities; // color -> the number of cities supplied on the table
static const int CARD_COSTS[6];
static const int CARD_COSTS_SIZE;
vector<string> COLORS;
vector<int> order; // [2, 3, 1] means player with id 2 move first, then player with id 3, then id 1;
void createPlayers();
bool selectMap();
void selectNumberOfPlayers();
void createDeck();
void createArmiesAndCities();
void printSixCards();
bool selectStartingRegion();
void bid();
Player* getPlayerById(int id);
bool criteriaA(int regionId);
bool criteriaB(int regionId);
Card* selectCard(Player* currentPlayer);
void computeMapScore();
void computeAbilityScore();
void computeElixirScore();
void displayWinner(Player* player);
void printComponents();
};
#endif //COMP345_WINTER2021_GAME_H