summaryrefslogtreecommitdiff
path: root/src/game/GameModel.h
blob: 6cb74cb6162fc742197c4aa5ce8ac1837faf7560 (plain)
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
#ifndef GAMEMODEL_H
#define GAMEMODEL_H

#include <vector>
#include "simulation/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