private void RotateTopFace(RubixCubeTopFace newTopFace) { RubixCubeTopFaceRotation rotation = new RubixCubeTopFaceRotation(this, newTopFace); FrontFace = rotation.NewFrontFace; LeftFace = rotation.NewLeftFace; RightFace = rotation.NewRightFace; TopFace = newTopFace; BackFace = rotation.NewBackFace; Validate(); }
private void InitializeTopFace() { TopFace = new RubixCubeTopFace() { FrontLeftCube = frontTopLeftCube, FrontCube = frontTopCube, FrontRightCube = frontTopRightCube, LeftCube = leftTopCube, CenterCube = topCube, RightCube = rightTopCube, BackLeftCube = backTopLeftCube, BackCube = backTopCube, BackRightCube = backTopRightCube }; }
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(); }