-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFactory.h
59 lines (41 loc) · 1.47 KB
/
Factory.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
#ifndef FACTORY_H
#define FACTORY_H
#include "Types.h"
#include <sstream>
#include <algorithm>
class Factory {
public:
// Constructor/Deconstructor
Factory(int factoryID);
//Constructor for loading
Factory(int factoryID, vector<char> loadingTiles);
~Factory();
//Returns the factoryID.
int getFactoryID();
//Adds first player token to the central factory.
void addFirstPlayerToken();
//Adds tiles to the factory.
void addTiles(vector<char> newTiles);
//Determines the number of tiles with the chosen colour that are in the factory.
int selectTiles(char tileColour);
//Determines if the select the tile color is in this factory
bool containColor(char tileColour);
//Determines if the factory is current filled or emptied
bool isFactoryEmpty();
//Specific funtion to remove F from the vector (Because of my architecture in M2)
void removeF();
//remove tiles from the centre factory,
vector<char> removeCentreTiles(char tileColour);
//remove tiles from the normal factory, and return unused tiles
vector<vector<char>> removeTiles(char tileColour);
//This function is to return all tiles in string format, e.g RYYU
string toString();
//This function outputs "1: R Y Y U"
string toConsole();
private:
//When a round starts, store up to 4 tiles into the vector
vector<char> tiles;
//Uniquely identifies an individual factory.
int factoryID;
};
#endif //FACTORY_H