Example #1
0
        private void Validate()
        {
            RubixCubeFaceValidationResult validation = new RubixCubeFaceValidationResult();

            FrontFace.Validate(validation);
            TopFace.Validate(validation);
            LeftFace.Validate(validation);
            RightFace.Validate(validation);
            BottomFace.Validate(validation);
            BackFace.Validate(validation);
            ValidateIdenticalCubes(validation);
            validation.FinishValidation();
        }
Example #2
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();
        }
Example #3
0
 public void RotateTopFaceAnticlockwise()
 {
     RotateTopFace(TopFace.RotateAnticlockwise());
 }
Example #4
0
 public void RotateTopFaceClockwise()
 {
     RotateTopFace(TopFace.RotateClockwise());
 }