summaryrefslogtreecommitdiffstats
path: root/Game.h
blob: a5a8a20f9629ac257ecf98b1343ad0a4e94aa80a (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
#ifndef _GAME_H
#define _GAME_H

#include "Player.h"
#include "Field.h"

class Game
{
public:
	Game(uint width, uint height, PlayerNumber num);
	virtual ~Game(void);

public:
	void startGame();
	void stopGame();
	void pauseGame();
	void resumeGame();
	/**
	 * This function is to be called by the MainWindow at each Main loop iteration.
	 **/
	void updateGame(uint timeElapsedMs);

	Player& getPlayerByID(PlayerNumber id);

	Field& getField();

private:
	static PlayerColor getColor(PlayerNumber n);

	std::vector<Player> m_vPlayers;
	bool m_gameStarted, m_gameRunning;
	Field m_Field;
};

#endif