From ecb04c6b7fbf5d06c2fdce5128e83575cac2bd21 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 23 May 2025 17:06:02 +0200 Subject: Web version (work in progress) --- web/examples/solve.mjs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'web/examples') 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 @@ import Nissy from '../nissy_web_module.mjs' -const nissy = await Nissy() +const nissy = await Nissy(); -nissy.setLogger(nissy._addCallbackFunction(console.log)) +var log = process.stdout.write.bind(process.stdout); +//var log = console.log +nissy.setLogger(nissy._addCallbackFunction(log)) -var cube = new nissy.Cube() -cube.move('R\' U\' F') +var cube = new nissy.Cube(); +cube.move('R\' U\' F'); -nissy.solve('h48h0k4', cube, nissy.NissFlag.normal, 0, 8, 2, 99, 4, -1) +nissy.solve('h48h0k4', cube, nissy.NissFlag.normal, 0, 8, 2, 99, 4, -1); -- cgit v1.3