/
Tile.h
42 lines (34 loc) · 953 Bytes
/
Tile.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
/**
* The Tile class represents the Wang Tile construct, holding information about its associated bitmap "texture," and the
* color codes of the N, E, S, W sides of the tile face.
*
* @author Sasha Ouellet - spaouellet@me.com
* @version 1.0 - 02/05/17
* @version 1.1 - 02/18/17 - New constructor to specify in advance the side codes rather than deriving from filename
*/
#ifndef WANGTILE_TILE_H
#define WANGTILE_TILE_H
#include <vector>
#include "BMPFile.h"
using namespace std;
class Tile
{
private:
BMPFile m_image;
vector<char> m_sideCodes;
public:
static const int NORTH = 0;
static const int EAST = 1;
static const int SOUTH = 2;
static const int WEST = 3;
Tile(BMPFile&);
Tile(BMPFile&, vector<char>&);
Tile(const Tile&);
char getCodeAtSide(int);
bool hasCodeAtSide(char, int);
void print();
BMPFile& getImage();
int getDimension();
bool isSame(Tile*);
};
#endif //WANGTILE_TILE_H