diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-17 20:46:06 (GMT) |
| commit | 4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch) | |
| tree | 3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/game/GameModel.h | |
| parent | 6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff) | |
| download | powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz | |
Some minor changes
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 |
