-
Notifications
You must be signed in to change notification settings - Fork 0
/
HexGrid.hpp
57 lines (50 loc) · 953 Bytes
/
HexGrid.hpp
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
#ifndef HEXGRID_HPP_
#define HEXGRID_HPP_
#include "includes.hpp"
class HexGrid {
public:
HexGrid();
HexGrid(int height, int width, float radius, sf::Color color);
HexGrid(HexGrid &grid);
void draw(sf::RenderWindow &App);
void handleMouse(sf::RenderWindow &App, sf::Event &evt);
void setHeight(int height);
int getHeight();
void setWidth(int width);
int getWidth();
void setRadius(float radius);
float getRadius();
void setColor(sf::Color color);
sf::Color getColor();
private:
sf::CircleShape hexagon;
sf::Color defColor;
int defHeight;
int defWidth;
int hexNumber;
int yRow;
float defRadius;
float xPos;
float yPos;
float myPos;
float mxPos;
float hXPos;
float hYPos;
float y1;
float y2;
float y3;
float y4;
float x1;
float x2;
float x3;
float m1;
float m2;
float m3;
float m4;
float b1;
float b2;
float b3;
float b4;
bool isHovering;
};
#endif