blob: 729b96159ec3f7e18a212f2e53a1c95b653c9274 (
plain)
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
|
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
class MainWindow : public sf::RenderWindow{
private:
std::vector<sf::Color> m_skin;
//int m_windowMargin;
//int m_sizeCell;
sf::Font m_font;
//Coordonates
sf::Vector2u m_windowSize;
sf::Vector2u m_gridSize;
sf::Vector2u m_cellSize;
sf::Vector2u m_gridPosition;
int m_spaceBetweenCell;
public:
MainWindow(int width, int height, std::string title);
~MainWindow();
void clearBG();
void drawGrid(std::vector<std::vector<int> > grid, bool gameIsOver);
void drawCell(int x, int y, int value);
sf::Color getCellColor(int value);
void drawGameOver(int gridX, int griY);
void drawATH();
};
|