-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTile.h
More file actions
40 lines (34 loc) · 841 Bytes
/
Tile.h
File metadata and controls
40 lines (34 loc) · 841 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
38
39
40
#pragma once
#include <iostream>
#include <vector>
#include "TextureManager.h"
using namespace std;
class Tile
{
private:
sf::Vector2f coordinates;
sf::Sprite image;
sf::Sprite revealedTile;
sf::Sprite debugFlag;
public:
//1-8 is the number, empty = 0, mine = 9
bool isMine;
bool isFlag;
bool canClick;
bool isRevealed;
int mineNumber;
vector<Tile*> neighborTiles;
//Default Tile Constructor
Tile();
//Tile Constructor
Tile(sf::Vector2f xyCoordinates, const char* texture, int _mineNumber);
sf::Sprite& GetImage();
sf::Sprite& GetRevealedTile();
sf::Sprite& GetDebugFlag();
void SetImage(const char* texture);
void SetRevealedTile(const char* texture);
void SetDebugFlag(const char* texture);
void newNeighbor(Tile* neighborTile);
bool RevealTile();
void PlaceFlag();
};