diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/client.cpp | 6 | ||||
-rw-r--r-- | server/client.h | 6 | ||||
-rw-r--r-- | server/game.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/server/client.cpp b/server/client.cpp index 95f7e1d..1fbef6d 100644 --- a/server/client.cpp +++ b/server/client.cpp @@ -104,8 +104,8 @@ void Client::round_start() { connection->send(make_shared<Message::RoundStart>()); } -void Client::round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a) { - connection->send(make_shared<Message::RoundState>(pl_d, pl_r, pl_u, pl_l, d, a)); +void Client::round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a, int p) { + connection->send(make_shared<Message::RoundState>(pl_d, pl_r, pl_u, pl_l, d, a, p)); } void Client::round_end(boost::function<void ()> callback) { @@ -133,7 +133,7 @@ void ClientDumb::round_start() { } -void ClientDumb::round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a) { +void ClientDumb::round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a, int p) { } diff --git a/server/client.h b/server/client.h index 91fd4b6..add78f0 100644 --- a/server/client.h +++ b/server/client.h @@ -28,7 +28,7 @@ class ClientBase { typedef Message::RoundState::Player PlayerState; //! Send round state. - virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a) = 0; + virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a, int p) = 0; //! Send round end. virtual void round_end(boost::function<void ()> callback) = 0; @@ -83,7 +83,7 @@ class Client : public ClientBase, public boost::enable_shared_from_this<Client> virtual void round_start(); //! Send round state. - virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a); + virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a, int p); //! Send round end. virtual void round_end(boost::function<void ()> callback); @@ -102,7 +102,7 @@ class ClientDumb : public ClientBase { virtual void round_start(); - virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a); + virtual void round_state(const PlayerState& pl_d, const PlayerState& pl_r, const PlayerState& pl_u, const PlayerState& pl_l, const Tiles& d, const Actions& a, int p); virtual void round_end(boost::function<void ()> callback); diff --git a/server/game.cpp b/server/game.cpp index 2e96578..628a966 100644 --- a/server/game.cpp +++ b/server/game.cpp @@ -128,7 +128,7 @@ void Game::round_update_draw() { a = possible_actions; } - players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a); + players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a, current_player - player); } while(++player); // Await action from client. @@ -157,7 +157,7 @@ void Game::round_update_discard() { } } - players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a); + players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a, current_player - player); } while(++player); preceding_action = Action::Pass; |