forked from ahmedibrahim404/Snakes_Ladders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationManager.h
38 lines (24 loc) · 867 Bytes
/
ApplicationManager.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
#pragma once
#include "DEFS.h"
#include "UI_Info.h"
class Input;
class Output;
class Grid;
// Main class that manages everything in the application.
class ApplicationManager
{
// Pointer to the Grid
Grid* pGrid;
// Pointers to the Input and Output
Input *pIn;
Output *pOut;
public:
ApplicationManager(); // Constructor: where the Input, Ouput and Grid are allocated
~ApplicationManager(); // Destructor for needed deallocations
// ========== Interface Management Functions ==========
Grid * GetGrid() const; // Returns pointer to the Grid
void UpdateInterface() const;
// ========== Action-Related Functions ==========
ActionType GetUserAction() const; // Reads the input command from the user and returns the corresponding action type
void ExecuteAction(ActionType) ; // Creates an action of the passed actionType and executes it
};