Esempio n. 1
0
        public void RotateFrontClockwise90Degree()
        {
            a1 = Face.RotateFrontClockwise90Degree(a1);
            a2 = Face.RotateFrontClockwise90Degree(a2);
            a3 = Face.RotateFrontClockwise90Degree(a3);

            AdjustOrder();
        }
Esempio n. 2
0
        private void RotateRightFaceToRight()
        {
            sbyte FaceIndexWithColor1 = GetFaceIndexForColor(Face.Right);

            //Make 1 as the color which is in faces[1]
            if (FaceIndexWithColor1 == Face.Right)
            {
                return;
            }

            //Rotate the cube so that the color 'Face.Right' center is facing right
            foreach (var face in Faces)
            {
                for (sbyte side = FaceIndexWithColor1; side != Face.Right; side = Face.RotateFrontClockwise90Degree(side))
                {
                    face.RotateFrontClockwise90Degree();
                }
            }

            AdjustFaces();
        }