private IAxis GetFreeRotationAxis(IMazeViewData mazeView) { IList <IAxis> allAxis = new List <IAxis>() { fAxisFactory.CreateZAxis(), fAxisFactory.CreateXAxis(), fAxisFactory.CreateYAxis() }; IAxis rotationAxis = fAxisFactory.CreateXAxis(); foreach (IAxis axis in allAxis) { Type axisType = axis.GetType(); Type leftRightAxisType = mazeView.LeftRightRotationAxis.GetType(); Type upDownAxisType = mazeView.UpDownRotationAxis.GetType(); if (leftRightAxisType == axisType || upDownAxisType == axisType) { continue; } return(axis); } return(rotationAxis); }
public MazeViewData(int start, int end, int size, IMazeNodeData nodeData, IAxisFactory axisFactory) { ViewSize = size; ViewEnd = end; ViewStart = start; UpDownRotationAxis = axisFactory.CreateXAxis(); LeftRightRotationAxis = axisFactory.CreateYAxis(); MazeNodes = CreateInitialView(nodeData, 0); InitializeMovementCube(); }