From de975396fe9eccd8f54c798b082c3d690b05c524 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 18 May 2022 15:59:48 -0700 Subject: web: change winning player message --- web/web_control.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'web/web_control.c') diff --git a/web/web_control.c b/web/web_control.c index 310bbcf..af5723a 100644 --- a/web/web_control.c +++ b/web/web_control.c @@ -185,21 +185,13 @@ void user_visit_to_rem(int rem) user_visit(state->legs[0]->rem - rem); } -static int num_players() -{ - if (state->mode == M_P) - return 1; - - return 2; -} - static int prev_throw_player() { if (match_is_over()) return state->active_player; if (state->active_player == 1) - return num_players(); + return match_num_players(); else return state->active_player - 1; } @@ -229,7 +221,7 @@ static void undo_active() } static bool first_user_has_thrown() { - for (int i = 0, np = num_players(); i < np; ++i) { + for (int i = 0, np = match_num_players(); i < np; ++i) { int pn = match_opts->throws_first + i; if (pn > np) pn -= np; -- cgit v1.2.3-70-g09d2