cubing / cubing.js

🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
https://js.cubing.net/cubing/
GNU General Public License v3.0
253 stars 46 forks source link

Write an alg parser in TypeScript #55

Open lgarron opened 7 years ago

lgarron commented 7 years ago

We have a good parser generator, but we could get some benefits from writing our own:

mikebolt commented 7 years ago

I wrote an algorithm parser using Parsimmon: https://github.com/mikebolt/ThreeTwist/blob/experiments/src/scripts/algorithm.js

The goal was to make it part of this "algorithm class" that had lots of useful methods. Feel free to use any code from ThreeTwist. Also stay away from CSS3D :)

lgarron commented 7 years ago

Take a look at https://github.com/cubing/alg.cubing.net/tree/v2/twisty/alg ;-)

I think it has everything you have have that isn't specific to cubes, but I'm happy to have help or suggestions for what directions to take it. :-)