Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #3
0
 public void RotateTopFaceAnticlockwise()
 {
     RotateTopFace(TopFace.RotateAnticlockwise());
 }
Beispiel #4
0
 public void RotateTopFaceClockwise()
 {
     RotateTopFace(TopFace.RotateClockwise());
 }