Esempio n. 1
0
        private void RotateFrontFace(RubixCubeFrontFace newFrontFace)
        {
            RubixCubeFrontFaceRotation rotation = new RubixCubeFrontFaceRotation(this, newFrontFace);

            FrontFace  = newFrontFace;
            TopFace    = rotation.NewTopFace;
            LeftFace   = rotation.NewLeftFace;
            RightFace  = rotation.NewRightFace;
            BottomFace = rotation.NewBottomFace;
            Validate();
        }
Esempio n. 2
0
 private void InitializeFrontFace()
 {
     FrontFace = new RubixCubeFrontFace()
     {
         TopLeftCube     = frontTopLeftCube,
         TopCube         = frontTopCube,
         TopRightCube    = frontTopRightCube,
         LeftCube        = frontLeftCube,
         CenterCube      = frontCube,
         RightCube       = frontRightCube,
         BottomLeftCube  = frontBottomLeftCube,
         BottomCube      = frontBottomCube,
         BottomRightCube = frontBottomRightCube
     };
 }
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();
        }