summaryrefslogtreecommitdiff
path: root/server/player.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-11-19 17:52:44 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-11-19 17:52:44 +0100
commitcad0ae2d88e74cc48bf62f872128d737013bbac2 (patch)
treecafe222d173658235f3f56e4f43faaa65f886682 /server/player.h
parenta5fbbe1c51968d330f1621efb5bf5d3b3c4ddf4d (diff)
Add game state and action functions to Player class.
Diffstat (limited to 'server/player.h')
-rw-r--r--server/player.h14
1 files changed, 13 insertions, 1 deletions
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<Player> {
boost::function<void (Player::p)> lobby_callback;
boost::function<void ()> ready_callback;
-
+ boost::function<void (Action)> action_callback;
std::string nick_;
@@ -37,12 +37,24 @@ class Player : public boost::enable_shared_from_this<Player> {
//! 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<void ()> callback, std::vector<Player::p> 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<void (Action)> callback);
};
#endif