summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/game.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/game.cpp b/server/game.cpp
index 24de238..407df34 100644
--- a/server/game.cpp
+++ b/server/game.cpp
@@ -251,6 +251,13 @@ void Game::handle_action_discard(Action action, int player) {
switch(preceding_action.type) {
case Action::Pass: {
// Tile not claimed, next player draws.
+
+ // Check if the wall has run out.
+ if(wall.remaining() <= 14) {
+ round_end();
+ break;
+ }
+
players[++current_player].draw(wall.take_one());
round_update_draw();
} break;