public void Build() { if (gridShapeGraph.gridType.GetDimension() != roundType.GetDimension()) { throw new InvalidOperationException("You cannot use this round map with thus type of grid."); } if (!gridShapeGraph.IsSet) { throw new InvalidOperationException("The shape for this grid is not set."); } if (spaceMapGraph == null) { throw new InvalidOperationException("The space map for this grid is not set."); } /*if(spaceMapGraph)*/ switch (gridShapeGraph.gridType) { case GridType.Grid1: BuildGrid1(); break; case GridType.Grid2: BuildGrid2(); break; case GridType.Grid3: BuildGrid3(); break; default: throw new ArgumentOutOfRangeException(); } InitGridBehaviours(); }