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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/web_control.c b/web/web_control.c
index f44315f..94e58b7 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -17,7 +17,7 @@ void set_active_player(int pn)
{
state->active_player = pn;
state->active_leg = state->legs[pn-1];
- EM_ASM({setPlayerActive($0)}, pn);
+ scoreboard_set_player_active(pn);
if (state->mode == M_PVC && pn == 2)
prompt_bot_visit();
@@ -186,7 +186,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);
+ scoreboard_set_player_active(state->active_player);
handle_next();
return;
}
@@ -253,13 +253,13 @@ void start_match(int mode)
state->legs[0] = leg_init(501, mode == M_PVP ? "Player 1" : "User");
state->legs[1] = leg_init(501, mode == M_PVC ? "Bot" : "Player 2");
- EM_ASM({showPlayerInfo($0)}, 1);
+ show_player_info(1);
update_player_name(1, state->legs[0]->name);
update_player_rem(1, state->legs[0]->rem);
update_player_avg(1, 0);
if (mode != M_P) {
- EM_ASM({showPlayerInfo($0)}, 2);
+ show_player_info(2);
update_player_name(2, state->legs[1]->name);
update_player_rem(2, state->legs[1]->rem);
update_player_avg(2, 0);