Closed lgarron closed 11 years ago
This probably just needs some proper classes with convenience methods and translation to twisty.js-usable formats.
By "JSON alg", you mean a twisty.js "move", right? By "move", I mean an element of the moveQueue in the file "twisty.js".
A "move" is a move. An alg would be a sequence of moves. The queue is a crude example of that, but actual representations of algs have some subtleties (normalizing / condensing moves, preserving metadata like commutators and/or comments).
Are you sure that's the sort of thing twisty.js should be dealing with? That really seems like an algnexus thing.
https://github.com/cubing/twisty.js/blob/master/inc/twisty/twisty_alg.js has rudimentary support by now.
I started this a while ago (still uncommitted), but this needs to be done carefully some time. It needs to incorporate things like commutator and comment parsing, and the ability to make text displays of algs correspond to animations.