cubing.js icon indicating copy to clipboard operation
cubing.js copied to clipboard

Support setting puzzle state

Open timhabermaas opened this issue 7 years ago • 4 comments

I'm looking for a way to set the current cube state like so: setCubeState("uuuuuuuuu fffffffff rrrrrrrrr bbbbbbbbb lllllllll ddddddddd"). The specific format/protocol doesn't matter. Is there a way to do this using twisty.js? I found a setPosition method, but this only seems to change the "pointer" pointing to the current move within an algorithm. Is such a feature even desired? It would probably break some assumptions like v.setPosition(0); v.isIdentity() == true.

timhabermaas avatar Jul 02 '18 09:07 timhabermaas

Using the current twisty.js, no. I'm actually currently discussing with @rokicki about what puzzle format to use for v2, where we're converging on something ksolve-like.

lgarron avatar Jul 02 '18 20:07 lgarron

Nice to hear. In case you guys wonder how the Giinker cube decodes the cube state, I've written about it here. I put it behind a link to not spoil anyone.

timhabermaas avatar Jul 02 '18 22:07 timhabermaas

@timhabermaas can you please share the Giiker decoding code again? The link is not working,

avaver avatar Sep 01 '18 13:09 avaver

@avaver https://gist.github.com/timhabermaas/ada7e51b31a7188b406c42b698ba237e#file-state_description-txt

timhabermaas avatar Sep 02 '18 11:09 timhabermaas