summaryrefslogtreecommitdiff
path: root/web/web_match.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-23 23:15:34 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-23 23:15:34 -0700
commit85c101979a181a76e6250fb1abb75216e08384a3 (patch)
tree00985c1d0823581376672107eab5345a31ff0443 /web/web_match.c
parentee146e45b9ccc7f3b5dfd34973df538a42772b84 (diff)
downloaddartboat-85c101979a181a76e6250fb1abb75216e08384a3.tar.gz
dartboat-85c101979a181a76e6250fb1abb75216e08384a3.tar.xz
move more match logic from web to lib
Diffstat (limited to 'web/web_match.c')
-rw-r--r--web/web_match.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/web/web_match.c b/web/web_match.c
index d4dac50..93ebf76 100644
--- a/web/web_match.c
+++ b/web/web_match.c
@@ -83,26 +83,7 @@ void match_opts_free()
match_opts = NULL;
}
-struct leg *state_active_leg()
-{
- return state->m->legs[state->m->active_player - 1];
-}
-
bool match_player_is_comp(int pn)
{
return state->m->players[pn - 1].type == PT_COMP;
}
-
-bool match_first_user_has_thrown()
-{
- for (int i = 0, np = state->m->n_players; i < np; ++i) {
- int pn = match_opts->throws_first + i;
- if (pn > np)
- pn -= np;
-
- if (!match_player_is_comp(pn))
- return !!state->m->legs[pn - 1]->n_visits;
- }
-
- return false;
-}