-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFactory.h
More file actions
executable file
·37 lines (32 loc) · 877 Bytes
/
Copy pathFactory.h
File metadata and controls
executable file
·37 lines (32 loc) · 877 Bytes
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
#ifndef FACTORY_H
#define FACTORY_H
#include <string>
#include <vector>
#include "Types.h"
using std::string;
class Factory
{
public:
//Initial constructor
Factory();
//Constructor taking array of tiles from saver
Factory(TileType array[FACTORY_SIZE]);
//Add tiles in array to factory
void fill(TileType array[FACTORY_SIZE]);
//Remove and return remaining tiles
std::vector<TileType> empty();
//Remove specified colour tile and return quantity
int draw(TileType tileType);
//Return string of contents
string toString();
//Return stroing with no whitespace (for saver)
string toStringNoSpace();
//Check if factory is empty
bool isEmpty();
//Check if factory contains given tile
bool contains(TileType tileType);
private:
//Storage of tiles
TileType tiles[FACTORY_SIZE];
};
#endif // !FACTORY_H