-
Notifications
You must be signed in to change notification settings - Fork 0
/
tile.h
51 lines (33 loc) · 966 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
43
44
45
46
47
48
49
50
51
#pragma once
//will be used to check for collisions and bounds in other classes
#include <SFML/Graphics.hpp>
#include <vector>
class TileMap {
private:
int w;
int h;
int difficulty = easy;
std::vector<std::vector<int>> grid;
std::vector<std::vector<int>> check;
int ts_;
sf::Sprite sTile_;
public:
enum Value { blank, move, captured, noenemy, checkwhat, minus = -1 };
enum Level { easy, medium, hard };
TileMap(int height, int width, int t_, Level diff, sf::Sprite spr);
~TileMap();
void InitBoard();
void drop(int y, int x);
void checkMinus();
bool checkPosVal(int y, int x, int v);
void draw(sf::RenderWindow& window, int x, int y);
void SetDifficulty(int diff);
int GetDifficulty();
int getPosValue(int y, int x);
void setPosValue(int y, int x, int v);
int getWidth();
int getHeight();
//Check through
int calcPercent();
std::vector<std::vector<int>>& getGridTop();
};