-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameLife.h
More file actions
42 lines (31 loc) · 738 Bytes
/
GameLife.h
File metadata and controls
42 lines (31 loc) · 738 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
41
#pragma once
#include <SFML/Graphics.hpp>
class GameLife{
private:
const int WIDTH = 1980;
const int HEIGHT = 1280;
const int RANDOM_RANGE = 5;
const int SQUARE_RADIUS = 20;
int **field;
int **oldField;
int quanHorElements;
int quanWertElements;
bool action = true;
bool board = true;
int age = 0;
int colony = 0;
int speed = 10;
void initField();
void deleteField();
void mouseClickEvent(const sf::Vector2<int> mousePos);
void swapField();
void printField(sf::RenderWindow &window);
void setCount(sf::RenderWindow &window);
void newAge();
void clearField();
void newGenerate();
public:
GameLife();
~GameLife();
void run();
};