diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-18 15:59:48 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-18 15:59:48 -0700 |
commit | de975396fe9eccd8f54c798b082c3d690b05c524 (patch) | |
tree | 75e2c55fa290bd742ecc5643b26d4af4cc0c6823 /web/web_control.c | |
parent | cbbb37271bdfd5b51824f8b5a3ee5354236beff0 (diff) | |
download | dartboat-de975396fe9eccd8f54c798b082c3d690b05c524.tar.gz dartboat-de975396fe9eccd8f54c798b082c3d690b05c524.tar.xz |
web: change winning player message
Diffstat (limited to 'web/web_control.c')
-rw-r--r-- | web/web_control.c | 12 |
1 files changed, 2 insertions, 10 deletions
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; |