From 36ebdbc3b66c3772e4b4e7600e9de5cbb2d9c3a6 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 28 Nov 2010 07:17:43 +0100 Subject: End the round when the wall is depleted. --- server/game.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server') 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; -- cgit v1.2.3