From 860fed5d03faa3e88ddd2357803e6b5a440efc8f Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 24 Apr 2022 19:44:43 -0700 Subject: web: enforce double out; hide suggested for bot; ui updates --- web/dartboat_wasm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'web/dartboat_wasm.c') diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index 1f81b1c..78538b5 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -8,11 +8,11 @@ #include -#define M_P 1 -#define M_PVP 2 -#define M_PVC 3 +#define M_PVC 1 +#define M_P 2 +#define M_PVP 3 -int delay_ms = 1000; +int delay_ms = 500; // TODO refactor *everything* @@ -166,7 +166,7 @@ EMSCRIPTEN_KEEPALIVE void update_boat_rem(int rem) { EM_ASM({updatePlayerRem($0, $1)}, 2, str); free(str); - get_suggested(rem, 2); + //get_suggested(rem, 2); } void end_boat_throwing(int, double); // FIXME @@ -222,7 +222,9 @@ EMSCRIPTEN_KEEPALIVE bool user_visit(int points) { points > state->active_l->rem || state->active_l->rem - points == 1 || points > 180 || points == 179 || points == 178 || points == 176 || points == 175 || points == 173 || points == 172 || points == 169 || - points == 166 || points == 163) { + points == 166 || points == 163 || + (state->active_l->rem - points == 0 && + (points == 168 || points == 165 || points == 162 || points == 159))) { EM_ASM(oi()); return false; -- cgit v1.2.3-70-g09d2