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(); }
private void InitializeFrontFace() { FrontFace = new RubixCubeFrontFace() { TopLeftCube = frontTopLeftCube, TopCube = frontTopCube, TopRightCube = frontTopRightCube, LeftCube = frontLeftCube, CenterCube = frontCube, RightCube = frontRightCube, BottomLeftCube = frontBottomLeftCube, BottomCube = frontBottomCube, BottomRightCube = frontBottomRightCube }; }
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(); }