From cad0ae2d88e74cc48bf62f872128d737013bbac2 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Fri, 19 Nov 2010 17:52:44 +0100 Subject: Add game state and action functions to Player class. --- server/player.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'server/player.h') diff --git a/server/player.h b/server/player.h index 667d6ea..ce37d0a 100644 --- a/server/player.h +++ b/server/player.h @@ -22,7 +22,7 @@ class Player : public boost::enable_shared_from_this { boost::function lobby_callback; boost::function ready_callback; - + boost::function action_callback; std::string nick_; @@ -37,12 +37,24 @@ class Player : public boost::enable_shared_from_this { //! Handle Ready-message. void handle_ready(Message::p msg); + //! Handle Action-message. + void handle_action(Message::p msg); + public: //! Return player's nick. std::string nick(); //! Notify client of a game start. void game_start(boost::function callback, std::vector players); + + //! Notify client of a round start. + void round_start(); + + //! Send round state. + void round_state(State::p state); + + //! Get action. + void get_action(boost::function callback); }; #endif -- cgit v1.2.3