Um yeah so I came up with a new way to represent the cube.. as 54
integers, 0-53, in an array. This is shown in Permutation.java and
implemented in solveCube.java. Currently I only have two permutations
done - rotating green face and rotating red face. The changes in Cube
were my attempt at making these permutations using the arrays, but I had
a really hard time and it was taking forever, so Permutation.java
contains a much simpler representation. Please take the time to
understand it.
Main class solveCube creates a new Algorithms object. Algorithms class
extends Permutation, which extends Cube. Just look at the descrip at the
top of each file. You can call different algorithms or perms from the
algorithms object in the main class in solveCube. Print cube using
TextIO.putln(cube.toString(boolean format)). Make sure to set
orientation before implementing an algorithm. Algorithms are
combinations of permutations performed RELATIVE to the orientation,
while permutations literally change the face you tell it to regardless
of orientation.
Oh, and I kept all the old code, just renamed it in an unused class
called OLDCube.