summaryrefslogtreecommitdiff
path: root/server/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/player.h')
-rw-r--r--server/player.h12
1 files changed, 10 insertions, 2 deletions
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 <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/function.hpp>
+#include <boost/asio.hpp>
#include "connection.h"
@@ -17,7 +18,11 @@ class Player : public boost::enable_shared_from_this<Player> {
private:
Connection::p connection;
+ boost::asio::deadline_timer timer;
+
boost::function<void (Player::p)> lobby_callback;
+ boost::function<void ()> ready_callback;
+
std::string nick_;
@@ -26,15 +31,18 @@ class Player : public boost::enable_shared_from_this<Player> {
//! 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<void ()> callback, std::vector<Player::p> players);
};
#endif