private void RotateLeftFace(RubixCubeLeftFace newLeftFace) { RubixCubeLeftFaceRotation rotation = new RubixCubeLeftFaceRotation(this, newLeftFace); FrontFace = rotation.NewFrontFace; TopFace = rotation.NewTopFace; LeftFace = newLeftFace; BottomFace = rotation.NewBottomFace; BackFace = rotation.NewBackFace; Validate(); }
private void InitializeLeftFace() { LeftFace = new RubixCubeLeftFace() { FrontTopCube = frontTopLeftCube, TopCube = leftTopCube, BackTopCube = backTopLeftCube, FrontCube = frontLeftCube, CenterCube = leftCube, BackCube = backLeftCube, FrontBottomCube = frontBottomLeftCube, BottomCube = leftBottomCube, BackBottomCube = backBottomLeftCube }; }
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(); }