diff options
| author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-24 19:44:43 -0700 | 
|---|---|---|
| committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-24 19:44:43 -0700 | 
| commit | 860fed5d03faa3e88ddd2357803e6b5a440efc8f (patch) | |
| tree | 87d92b97affd78eed4b085961aaf15ed1251da0c /web/dartboat_wasm.c | |
| parent | abe6abebf502b2c3aebdbe5a8311fe6e2a35053f (diff) | |
| download | dartboat-860fed5d03faa3e88ddd2357803e6b5a440efc8f.tar.gz dartboat-860fed5d03faa3e88ddd2357803e6b5a440efc8f.tar.xz  | |
web: enforce double out; hide suggested for bot; ui updates
Diffstat (limited to 'web/dartboat_wasm.c')
| -rw-r--r-- | web/dartboat_wasm.c | 14 | 
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;  | 
