예제 #1
0
        //                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);
        }
예제 #2
0
 public Color getColor(Face face, LocationInFace locationInFace)
 {
     return(colors[(int)face, (int)locationInFace]);
 }
예제 #3
0
 public void setColor(Face face, LocationInFace locationInFace, Color color)
 {
     colors[(int)face, (int)locationInFace] = color;
 }
예제 #4
0
 private Boolean colorInFaceNotEqual(Cube comparedCube, Face face, LocationInFace locationInFace)
 {
     return(getColor(face, locationInFace) != comparedCube.getColor(face, LocationInFace.BOTTOM));
 }