summaryrefslogtreecommitdiff
path: root/web/web_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_control.c')
-rw-r--r--web/web_control.c12
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;