From b2527a9eaa7082c50ce6230e79df88edbced9abb Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 15 Nov 2010 12:28:19 +0100 Subject: Implement server program flow around GameStart. --- server/player.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'server/player.h') diff --git a/server/player.h b/server/player.h index 17e8989..667d6ea 100644 --- a/server/player.h +++ b/server/player.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "connection.h" @@ -17,7 +18,11 @@ class Player : public boost::enable_shared_from_this { private: Connection::p connection; + boost::asio::deadline_timer timer; + boost::function lobby_callback; + boost::function ready_callback; + std::string nick_; @@ -26,15 +31,18 @@ class Player : public boost::enable_shared_from_this { //! Start communicating. void start(); - //! Handle login. + //! Handle Login-message. void handle_login(Message::p msg); + //! Handle Ready-message. + void handle_ready(Message::p msg); + public: //! Return player's nick. std::string nick(); //! Notify client of a game start. - void game_start(); + void game_start(boost::function callback, std::vector players); }; #endif -- cgit v1.2.3