-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTetris.h
44 lines (37 loc) · 924 Bytes
/
Tetris.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
#ifndef __TETRIS_H__
#define __TETRIS_H__
#include "states/State.h"
class Panel;
class GameEngine;
class Tetris
{
public:
Tetris(GameEngine* engine);
~Tetris();
void Start();
void UpdatePanel(bool left, bool right, bool down, bool shift);
void UpdateFrame();
void UpdateRender();
void ChangeState(StateType state);
void DrawPanel();
void DrawGameOver();
void DrawMenu();
void DrawSplash();
bool IsFinished() const;
bool IsDirty(int iRow, int iColumn) const;
bool IsLeftKeyPressed() const;
bool IsRightKeyPressed() const;
bool IsDownKeyPressed() const;
bool IsShiftKeyPressed() const;
bool IsPauseKeyPressed() const;
bool IsRestartKeyPressed() const;
bool IsContinueKeyPressed() const;
int GetLevel();
void Reset();
private:
Panel* _panel;
GameEngine* _engine;
State* _cur_state;
State* _states[ST_MAX];
};
#endif