-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgame.h
58 lines (43 loc) · 989 Bytes
/
game.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
52
53
54
55
56
57
58
#ifndef GAME_H
#define GAME_H
#include "point.h"
#include <QPixmap>
class Game
{
public:
Game();
const int BOARD_HEIGHT;
const int BOARD_WIDTH;
static const float SPEED;
static const float SPEED_UP;
static const int COUNT_OF_COLORS;
static const int COUNT_OF_FIGURES;
static const int COUNT_OF_BLOCKS;
static QSize BLOCK_SIZE;
static QSize RESOLUTION;
int m_field[20][10];
Point m_a[4], m_b[4];
int m_figures[7][4];
bool check();
int m_dx;
bool m_rotate;
int m_colorNum;;
float m_timer,m_delay;
QPixmap m_tile;
QPixmap m_background;
QPixmap m_frame;
QPixmap m_pauseBackground;
QPixmap m_scorePixmap;
QPixmap m_numbersPixmap;
QPixmap m_gameOverBackground;
QPixmap m_restartTextPixmap;
enum class State{
Active, Paused, Game_Over
};
State m_state;
int m_score;
void addScore(int val);
bool m_gameOver;
void reset();
};
#endif // GAME_H