summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/game.cpp8
-rw-r--r--server/game.h6
2 files changed, 10 insertions, 4 deletions
diff --git a/server/game.cpp b/server/game.cpp
index 76ee99d..75b369d 100644
--- a/server/game.cpp
+++ b/server/game.cpp
@@ -63,6 +63,10 @@ void Game::round_start() {
// Build a new wall.
wall.build();
+ // Clear previous dora and draw a new.
+ dora.clear();
+ dora.push_back(wall.take_one());
+
// Notify players of round start.
// TODO: Tell them where wall is broken.
players[0].round_start();
@@ -111,7 +115,7 @@ void Game::round_update_draw() {
a = possible_actions;
}
- players[player].client->round_state(state[0], state[1], state[2], state[3], Tiles(), a);
+ players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a);
} while(++player);
// Await action from client.
@@ -140,7 +144,7 @@ void Game::round_update_discard() {
}
}
- players[player].client->round_state(state[0], state[1], state[2], state[3], Tiles(), a);
+ players[player].client->round_state(state[0], state[1], state[2], state[3], dora, a);
} while(++player);
preceding_action = Action::Pass;
diff --git a/server/game.h b/server/game.h
index a39b44a..5d32a77 100644
--- a/server/game.h
+++ b/server/game.h
@@ -86,6 +86,10 @@ class Game : public boost::enable_shared_from_this<Game> {
Player players[4];
+ Wall wall;
+
+ Tiles dora;
+
PlayerNum current_player;
int awaiting_players;
@@ -95,8 +99,6 @@ class Game : public boost::enable_shared_from_this<Game> {
Game(Client::p player_1, Client::p player_2, Client::p player_3, Client::p player_4);
- Wall wall;
-
//! Handle Ready message from player.
void handle_ready();