summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/game.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/game.cpp b/server/game.cpp
index 565468b..5a27eea 100644
--- a/server/game.cpp
+++ b/server/game.cpp
@@ -249,13 +249,21 @@ void Game::handle_action_discard(Action action, int player) {
break;
}
- case Action::Ron:
+ // First ron.
if(action.type == Action::Ron) {
// TODO: Handle simultanous ron.
preceding_action = action;
preceding_action_owner = player;
break;
}
+
+ // Multiple ron.
+ case Action::Ron:
+ if(action.type == Action::Ron && current_player - player > current_player - preceding_action_owner) {
+ preceding_action = action;
+ preceding_action_owner = player;
+ break;
+ }
break;
// Will never occur on discard: