summaryrefslogtreecommitdiff
path: root/server/game.h
blob: 00da0bcd529c6e19f58185d3842b848de082947f (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
#ifndef GAME_H
#define GAME_H

#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>

#include <vector>

#include "player.h"

class Game : public boost::enable_shared_from_this<Game> {
	public:
		typedef boost::shared_ptr<Game> p;
		
		static p create(Player::p player_1, Player::p player_2, Player::p player_3, Player::p player_4);
		
	private:
		std::vector<Player::p> players;
		
		int waiting_players;
		
		Game(Player::p player_1, Player::p player_2, Player::p player_3, Player::p player_4);
		
		//! Handle Ready message from player.
		void handle_ready();
		
		//! Start the game.
		void start();
		
};

#endif