diff options
Diffstat (limited to 'web/web_control.c')
-rw-r--r-- | web/web_control.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/web_control.c b/web/web_control.c index 3891750..25f2ccb 100644 --- a/web/web_control.c +++ b/web/web_control.c @@ -43,8 +43,8 @@ void end_boat_visit(int rem, double avg) EM_ASM(svgClearPoints()); update_player_rem(2, rem); scoreboard_set_player_avg(2, avg); - EM_ASM({setPromptInput($0)}, ""); - EM_ASM({promptMsgR($0)}, ""); + prompt_set_input(NULL); + prompt_set_msgr(NULL); draw_visits(); handle_next(); @@ -62,10 +62,11 @@ void draw_boat_throwing(int pts, char *str, double x, double y) svg_draw_point(x, y); update_player_rem(2, rem - pts); - EM_ASM({setPromptInput($0)}, pts_str); - EM_ASM({promptMsgR($0)}, str); + prompt_set_input(pts_str); + prompt_set_msgr(str); free(str); + prompt_flush(); scoreboard_flush_player_info(2); // FIXME bot hard-coded as player 2 } @@ -136,6 +137,7 @@ void handle_next() } } + prompt_flush(); scoreboard_flush(); } |