diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-23 17:06:02 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-05-23 17:06:02 +0200 |
| commit | ecb04c6b7fbf5d06c2fdce5128e83575cac2bd21 (patch) | |
| tree | 3946a99938c10b61f7822c715771c3529400cebc /web/examples/solve.mjs | |
| parent | c6a77f30f64be73a5e55e06336975f2ecfbb2324 (diff) | |
| download | nissy-core-ecb04c6b7fbf5d06c2fdce5128e83575cac2bd21.tar.gz nissy-core-ecb04c6b7fbf5d06c2fdce5128e83575cac2bd21.zip | |
Web version (work in progress)
Diffstat (limited to '')
| -rw-r--r-- | web/examples/solve.mjs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/web/examples/solve.mjs b/web/examples/solve.mjs index c7bce71..8ff59c0 100644 --- a/web/examples/solve.mjs +++ b/web/examples/solve.mjs | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | import Nissy from '../nissy_web_module.mjs' | 1 | import Nissy from '../nissy_web_module.mjs' |
| 2 | 2 | ||
| 3 | const nissy = await Nissy() | 3 | const nissy = await Nissy(); |
| 4 | 4 | ||
| 5 | nissy.setLogger(nissy._addCallbackFunction(console.log)) | 5 | var log = process.stdout.write.bind(process.stdout); |
| 6 | //var log = console.log | ||
| 7 | nissy.setLogger(nissy._addCallbackFunction(log)) | ||
| 6 | 8 | ||
| 7 | var cube = new nissy.Cube() | 9 | var cube = new nissy.Cube(); |
| 8 | cube.move('R\' U\' F') | 10 | cube.move('R\' U\' F'); |
| 9 | 11 | ||
| 10 | nissy.solve('h48h0k4', cube, nissy.NissFlag.normal, 0, 8, 2, 99, 4, -1) | 12 | nissy.solve('h48h0k4', cube, nissy.NissFlag.normal, 0, 8, 2, 99, 4, -1); |
