summaryrefslogtreecommitdiff
path: root/web/web_control.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 20:03:01 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 20:03:01 -0700
commitf4c0da6517e3a5bf4e87d2ac0acf474fbc75d62c (patch)
treee08dbb1336f9bf74a7e7d2d1cefd4728c9b57e18 /web/web_control.c
parent309a8042a3a84476637ad9c0f6535a1d71369759 (diff)
downloaddartboat-f4c0da6517e3a5bf4e87d2ac0acf474fbc75d62c.tar.gz
dartboat-f4c0da6517e3a5bf4e87d2ac0acf474fbc75d62c.tar.xz
web: more renaming
Diffstat (limited to 'web/web_control.c')
-rw-r--r--web/web_control.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/web_control.c b/web/web_control.c
index 6c51167..3891750 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -2,8 +2,8 @@
#include "web_match.h"
#include "web_opts.h"
#include "web_prompt.h"
+#include "web_scoreboard.h"
#include "web_svg.h"
-#include "web_ui.h"
#include "comp.h"
@@ -34,7 +34,7 @@ EMSCRIPTEN_KEEPALIVE
void update_user_rem_from_pts(int pts)
{
update_player_rem(state->active_player, state->active_leg->rem - pts);
- ui_flush_player_info(state->active_player);
+ scoreboard_flush_player_info(state->active_player);
}
EMSCRIPTEN_KEEPALIVE
@@ -42,7 +42,7 @@ void end_boat_visit(int rem, double avg)
{
EM_ASM(svgClearPoints());
update_player_rem(2, rem);
- ui_set_player_avg(2, avg);
+ scoreboard_set_player_avg(2, avg);
EM_ASM({setPromptInput($0)}, "");
EM_ASM({promptMsgR($0)}, "");
@@ -66,7 +66,7 @@ void draw_boat_throwing(int pts, char *str, double x, double y)
EM_ASM({promptMsgR($0)}, str);
free(str);
- ui_flush_player_info(2); // FIXME bot hard-coded as player 2
+ scoreboard_flush_player_info(2); // FIXME bot hard-coded as player 2
}
EMSCRIPTEN_KEEPALIVE
@@ -136,7 +136,7 @@ void handle_next()
}
}
- ui_flush();
+ scoreboard_flush();
}
EMSCRIPTEN_KEEPALIVE
@@ -179,7 +179,7 @@ void user_undo()
if (state->num_darts) {
state->num_darts = 0;
- ui_set_player_avg(state->active_player,
+ scoreboard_set_player_avg(state->active_player,
((double)(state->active_leg->start -
state->active_leg->visits[
state->active_leg->n_visits-2].rem) /
@@ -209,10 +209,10 @@ void user_undo()
++state->boat_undone;
}
- ui_set_player_avg(state->active_player, 0);
+ scoreboard_set_player_avg(state->active_player, 0);
update_player_rem(state->active_player, l->rem);
if (state->mode == M_PVC) {
- ui_set_player_avg(2, 0);
+ scoreboard_set_player_avg(2, 0);
update_player_rem(2, state->legs[1]->rem);
}