Esempio n. 1
0
        private void RotateRightFace(RubixCubeRightFace newRightFace)
        {
            RubixCubeRightFaceRotation rotation = new RubixCubeRightFaceRotation(this, newRightFace);

            FrontFace  = rotation.NewFrontFace;
            TopFace    = rotation.NewTopFace;
            RightFace  = newRightFace;
            BottomFace = rotation.NewBottomFace;
            BackFace   = rotation.NewBackFace;
            Validate();
        }
Esempio n. 2
0
 private void InitializeRightFace()
 {
     RightFace = new RubixCubeRightFace()
     {
         FrontTopCube    = frontTopRightCube,
         TopCube         = rightTopCube,
         BackTopCube     = backTopRightCube,
         FrontCube       = frontRightCube,
         CenterCube      = rightCube,
         BackCube        = backRightCube,
         FrontBottomCube = frontBottomRightCube,
         BottomCube      = rightBottomCube,
         BackBottomCube  = backBottomRightCube
     };
 }
Esempio n. 3
0
        public void RotateBottomFaceToFrontFace()
        {
            RubixCubeFrontFace  newFrontFace  = BottomFace.MoveToFront();
            RubixCubeTopFace    newTopFace    = FrontFace.MoveToTop();
            RubixCubeLeftFace   newLeftFace   = LeftFace.RotateClockwise();
            RubixCubeRightFace  newRightFace  = RightFace.RotateClockwise();
            RubixCubeBottomFace newBottomFace = BackFace.MoveToBottom();
            RubixCubeBackFace   newBackFace   = TopFace.MoveToBack();

            FrontFace  = newFrontFace;
            TopFace    = newTopFace;
            LeftFace   = newLeftFace;
            RightFace  = newRightFace;
            BottomFace = newBottomFace;
            BackFace   = newBackFace;
            Validate();
        }