예제 #1
0
        private void RotateBottomFace(RubixCubeBottomFace newBottomFace)
        {
            RubixCubeBottomFaceRotation rotation = new RubixCubeBottomFaceRotation(this, newBottomFace);

            FrontFace  = rotation.NewFrontFace;
            LeftFace   = rotation.NewLeftFace;
            RightFace  = rotation.NewRightFace;
            BottomFace = newBottomFace;
            BackFace   = rotation.NewBackFace;
            Validate();
        }
예제 #2
0
 private void InitializeBackFace()
 {
     BackFace = new RubixCubeBackFace()
     {
         TopLeftCube     = backTopLeftCube,
         TopCube         = backTopCube,
         TopRightCube    = backTopRightCube,
         LeftCube        = backLeftCube,
         CenterCube      = backCube,
         RightCube       = backRightCube,
         BottomLeftCube  = backBottomLeftCube,
         BottomCube      = backBottomCube,
         BottomRightCube = backBottomRightCube
     };
 }
예제 #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();
        }