mikebolt / ThreeTwist

ThreeTwist is a JavaScript library for simulating, visualizing, and interacting with 3D twisty puzzles.
MIT License
3 stars 0 forks source link

Implement NxNxN cubes #1

Closed mikebolt closed 8 years ago

mikebolt commented 9 years ago

It would be nice to have, in addition to the 3x3x3 puzzle, other puzzle sizes like the 2x2x2, 4x4x4, and 5x5x5. But why stop there? It makes more sense to me to just write the library in an abstract way such that a cube of any order can be created.

There are going to be some roadblocks. There are lots of places where values specific to the 3x3x3 are hardcoded, and lots of places where the logic only applies to the 3x3x3 puzzle. I estimate that a fourth of the existing code will have to be modified and that the code will grow by 30%.

mikebolt commented 9 years ago

Progress is being made on this in the 'bigcubes' branch. I have a 5x5x5 cube displaying properly, rotating nicely around as a whole, and occasionally letting you make a twist or two with the mouse before causing an error.

Here's a picture: better_5x5x5_cube_cropped

mikebolt commented 8 years ago

All done. My estimates were way off. The code is now significantly smaller, because I removed lots of features in order to focus on NxNxN cubes.