-
Notifications
You must be signed in to change notification settings - Fork 0
/
CController.h
55 lines (49 loc) · 1.19 KB
/
CController.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
#ifndef CCONTROLLER_H
#define CCONTROLLER_H
#include "COLOR.h"
#include "CGameSession.h"
class CAbstractMenuScreen;
/**
*
* Class performing high-level functionality (should resemble a controller as in the MVC design pattern)
*/
class CController {
public:
CController();
/**
* Calls for a deletion of menu screens
*/
virtual ~CController();
/**
* Calls a current menu to display itself
*/
void showMenus();
/**
* Calls for a game initalization
*/
void startGame();
/**
* Calls for a game termination
*/
void endGame();
/**
* Returns a reference to the instance of a game
*/
CGameSession & getGameSess();
/**
* The main game loop where everything happens
*/
void gameLoop();
/**
* Calls initialization of a game server (online play only)
*/
private:
/**
* Deletes a linked list of menu screens
*/
void deleteMenus();
CAbstractMenuScreen * menu; ///< The head of the linked list of menu screens
CGameSession game; ///< the instance of a game containing all important data and functionality
//CGUI gui;
};
#endif /* CCONTROLLER_H */