diff options
Diffstat (limited to 'src/game/GameModel.h')
| -rw-r--r-- | src/game/GameModel.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/game/GameModel.h b/src/game/GameModel.h new file mode 100644 index 0000000..a2eb3ce --- /dev/null +++ b/src/game/GameModel.h @@ -0,0 +1,37 @@ +#ifndef GAMEMODEL_H +#define GAMEMODEL_H + +#include <vector> +#include "Simulation.h" +#include "Renderer.h" +#include "GameView.h" + +using namespace std; + +class GameView; +class Simulation; +class Renderer; + +class GameModel +{ +private: + vector<GameView*> observers; + Simulation * sim; + Renderer * ren; + int activeElement; + void notifyRendererChanged(); + void notifySimulationChanged(); + void notifyPausedChanged(); +public: + GameModel(); + void AddObserver(GameView * observer); + int GetActiveElement(); + void SetActiveElement(int element); + bool GetPaused(); + void SetPaused(bool pauseState); + + Simulation * GetSimulation(); + Renderer * GetRenderer(); +}; + +#endif // GAMEMODEL_H |
