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