blob: 072a7ece37c7237aee74b25e25b63df47f8cdde6 (
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
41
42
43
|
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include "../Model/Stats.hpp"
#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(Stats stats);
void drawGame(std::vector<std::vector<int> > grid, bool gameIsOver, Stats stats);
};
|