diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-25 12:38:39 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-25 12:38:39 +0200 |
| commit | 87852933851674cacbc8b2295d046831db27ab81 (patch) | |
| tree | e67a8b8d3ff9d41c927887483f62882da6258fb6 /web/http/worker.mjs | |
| parent | 2852d47c0e7b0da72259ddcec693270d52110578 (diff) | |
| download | nissy-core-87852933851674cacbc8b2295d046831db27ab81.tar.gz nissy-core-87852933851674cacbc8b2295d046831db27ab81.zip | |
Cleanup
Diffstat (limited to 'web/http/worker.mjs')
| -rw-r--r-- | web/http/worker.mjs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/http/worker.mjs b/web/http/worker.mjs index 5756598..831ef09 100644 --- a/web/http/worker.mjs +++ b/web/http/worker.mjs | |||
| @@ -7,5 +7,11 @@ onmessage = (e) => { | |||
| 7 | var cube = new nissy.Cube(); | 7 | var cube = new nissy.Cube(); |
| 8 | cube.move(e.data.scramble); | 8 | cube.move(e.data.scramble); |
| 9 | nissy.solve(e.data.solver, cube, nissy.NissFlag.normal, 0, 17, 1, 99, 4, -1) | 9 | nissy.solve(e.data.solver, cube, nissy.NissFlag.normal, 0, 17, 1, 99, 4, -1) |
| 10 | .then((sol) => postMessage(sol)) | 10 | .then((solve_result) => { |
| 11 | if (!solve_result.err.ok()) | ||
| 12 | posMessage("Error while solving (solve returned " + | ||
| 13 | solve_result.err.value + ")"); | ||
| 14 | else | ||
| 15 | postMessage(solve_result.solutions) | ||
| 16 | }); | ||
| 11 | }; | 17 | }; |
