-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.h
47 lines (37 loc) · 804 Bytes
/
App.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
#ifndef APP_H_INCLUDED
#define APP_H_INCLUDED
enum
{
GRID_NONE = 0,
GRID_X,
GRID_O
};
class App: public Event
{
private:
SDL_Window* window;
SDL_Renderer* renderer;
bool isRunning;
SDL_Texture* gridTexture;
SDL_Texture* xTexture;
SDL_Texture* oTexture;
int grid[9];
int currentPlayer;
public:
App();
~App();
int Execute();
bool Initialise();
void OnEvent(SDL_Event* event);
void Update();
void Render();
void Quit();
//Event functions
void LeftButtonDown(const int &mouseX, const int &mouseY);
void RightButtonDown(const int &mouseX, const int &mouseY);
void Exit();
//Game related functions
void ResetGrid();
void SetGridCell(const int &cell, const int &type);
};
#endif // APP_H_INCLUDED