// TL T TR // L TOP R // BL B BR //TL T TR TL T TR TL T TR TL T TR //LBACK R LLEFT R LFRONTR LRIGHTR //BL B BR BL B BR BL B BR BL B BR // TL T TR // LBOTTOMR // BL B BR private void rotateLeftToRight(Face firstFace, LocationInFace firstLocationInFace, Face secondFace, LocationInFace secondLocationInFace, Face thirdFace, LocationInFace thirdLocationInFace, Face fourthFace, LocationInFace fourthLocationInFace) { Color temp = getColor(fourthFace, fourthLocationInFace); setColor(fourthFace, fourthLocationInFace, getColor(thirdFace, thirdLocationInFace)); setColor(thirdFace, thirdLocationInFace, getColor(secondFace, secondLocationInFace)); setColor(secondFace, secondLocationInFace, getColor(firstFace, firstLocationInFace)); setColor(firstFace, firstLocationInFace, temp); }
public Color getColor(Face face, LocationInFace locationInFace) { return(colors[(int)face, (int)locationInFace]); }
public void setColor(Face face, LocationInFace locationInFace, Color color) { colors[(int)face, (int)locationInFace] = color; }
private Boolean colorInFaceNotEqual(Cube comparedCube, Face face, LocationInFace locationInFace) { return(getColor(face, locationInFace) != comparedCube.getColor(face, LocationInFace.BOTTOM)); }