From 0913dec10964f02a0b813181bb2a076d814b2909 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Fri, 10 Dec 2010 03:42:13 +0100 Subject: Implemented "atama hane"-rule on multiple ron. --- server/game.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'server/game.cpp') 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: -- cgit v1.2.3