summaryrefslogtreecommitdiff
path: root/web/dartboat_wasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/dartboat_wasm.c')
-rw-r--r--web/dartboat_wasm.c14
1 files changed, 8 insertions, 6 deletions
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 <emscripten/emscripten.h>
-#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;