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.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/web/web_control.c b/web/web_control.c
index b1e20bc..13e37ec 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -18,16 +18,10 @@ void set_active_player(int pn)
state->active_leg = state->legs[pn-1];
EM_ASM({setPlayerActive($0)}, pn);
- if (state->mode == M_PVC && pn == 2) {
- EM_ASM({promptMsgL($0)}, "Bot is throwing…");
- set_prompt_mode(PM_DARTBOARD);
- } else {
- EM_ASM({promptMsgL($0)}, "Enter points:");
- EM_ASM({setKeyLabel($0, $1)}, "submit", "OK");
- EM_ASM({setKeyLabel($0, $1)}, "rem", "REMAINING");
- set_prompt_mode(PM_VISIT);
- }
- EM_ASM({promptMsgR($0)}, "");
+ if (state->mode == M_PVC && pn == 2)
+ prompt_bot_visit();
+ else
+ prompt_visit();
}
void toggle_active_player()
@@ -167,6 +161,7 @@ void user_undo()
state->active_leg->visits[
state->active_leg->n_visits-2].rem) /
(state->active_leg->n_visits-1)));
+ EM_ASM({setPlayerActive($0)}, state->active_player);
handle_next();
return;
}