#ifndef GAME_H #define GAME_H #include #include #include #include "wall.h" #include "player.h" #include "../common/action.h" class Game : public boost::enable_shared_from_this { public: typedef boost::shared_ptr p; static p create(Player::p player_1, Player::p player_2, Player::p player_3, Player::p player_4); ~Game(); private: std::vector players; int waiting_players; Game(Player::p player_1, Player::p player_2, Player::p player_3, Player::p player_4); //! The wall that belongs to this game Wall wall; //! The current state of the game State game_state; //! Current player, used when discarding etc int current_player; //! Are we in draw or discard phase? bool draw_phase; //! Number of players doing action int num_player_actions; //! Highest value action done Action most_value_action; //! Handle Ready message from player. void handle_ready(); //! Start the game. void start(); void round_start(); void round_update(); void handle_action(Action action); void round_end(); }; #endif