diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-01 10:34:36 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-01 10:34:36 -0700 |
commit | 9459b7fb563caae520bdf8d11da9b070ebff45e9 (patch) | |
tree | 4f20b3ead4224d564fd3b0a4d67b0ede98b5912d /web | |
parent | f9117e7c9b5b6602e4eb55ee48815882a7085782 (diff) | |
download | dartboat-9459b7fb563caae520bdf8d11da9b070ebff45e9.tar.gz dartboat-9459b7fb563caae520bdf8d11da9b070ebff45e9.tar.xz |
move valid points check to match file
Diffstat (limited to 'web')
-rw-r--r-- | web/dartboat_wasm.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/web/dartboat_wasm.c b/web/dartboat_wasm.c index b4d232a..658277d 100644 --- a/web/dartboat_wasm.c +++ b/web/dartboat_wasm.c @@ -309,14 +309,7 @@ void update_player_avg(int pn, int n_darts) EMSCRIPTEN_KEEPALIVE void user_visit(int points) { - if (points < 0 || points > state->active_leg->rem || - state->active_leg->rem - points == 1 || - points > 180 || points == 179 || points == 178 || points == 176 || - points == 175 || points == 173 || points == 172 || points == 169 || - points == 166 || points == 163 || - (state->active_leg->rem - points == 0 && - (points > 170 || points == 168 || points == 165 || points == 162 || - points == 159))) { + if (!is_points_valid(points, state->active_leg->rem)) { EM_ASM(oi()); return; } |