-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameState.h
More file actions
36 lines (28 loc) · 734 Bytes
/
GameState.h
File metadata and controls
36 lines (28 loc) · 734 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
#ifndef GAMESTATE_H
#define GAMESTATE_H
#include "State.h"
#include "Controller.h"
#define DEFAULT_REFRESH_RATE 33
class GameState: public State {
GameState();
static GameState *instance;
static bool instanceFlag;
GameState(GameState const&) = delete;
void operator=(GameState const&) = delete;
int iterCount;
bool gameOver;
int refreshRate;
public:
static GameState *getInstance();
bool isGameOver();
void setGameOver(bool b);
int getRefreshRate();
void setRefreshRate(int r);
int getIterCount();
void setIterCount(int i);
void go(int refreshRate = DEFAULT_REFRESH_RATE);
bool start();
void end();
void processAction(Action action);
};
#endif