The following examples all throw errors:
Where did I go wrong?
1
const randomCube = Cube.random();
Cube.asyncInit('./lib/worker.js', function () {
// Cannot read property '24092' of null
console.log(randomCube.solve());
});
2
const randomCube = Cube.random();
Cube.asyncInit('./lib/worker.js', function () {
//cube.toJSON is not a function
Cube.asyncSolve(randomCube, function (algorithm) {
console.log(algorithm);
});
});
The following examples all throw errors:
Where did I go wrong? 1
2
I wrote a demo here: https://github.com/Aaron-Bird/cubejs-demo