public void NewMap(int size) { _hexGrid.ConstructHexGrid(size); // Remove 25% of Coordinates except 0,0,0 foreach (Vector3 cube in _hexGrid.GetCubesFromContainer("all")) { if (cube == Vector3.zero) { continue; } if (Random.Range(0.0f, 100.0f) < 25.0f) { _hexGrid.RemoveCube(cube); } } // Remove Coordinates not reachable from 0,0,0 _hexGrid.RemoveCubes( _hexGrid.BooleanDifferenceCubes( _hexGrid.GetCubesFromContainer("all"), _hexGrid.GetReachableCubes(Vector3.zero, 10) ) ); // Display Coordinates _hexGrid.ShowHexagonCellsInContainer("all"); }