public BridgeGenerator(Map map, SectionPositioner positioner) { myMap = map; myPositioner = positioner; GenerateBridges(); for (int i = 0; i < Bridges.Count; i++) { map.Bridges.Add(Bridges[i]); } }
/// <summary> /// Generates Map Data needed to build Map itself in the builder. /// </summary> /// <returns>Map data</returns> public Map GenerateMap() { var GeneratedMap = new Map(GenerateSeed()); sectionPositioner = new SectionPositioner(_mapGenerationInput); //Generate and position empty sections for (int i = 1; i < _mapGenerationInput.SectionsAmount + 1; i++) { var MapSection = GenerateSection(i); GeneratedMap.MapSections.Add(i, MapSection); } //Generate Portals new BridgeGenerator(GeneratedMap, sectionPositioner); //Generate Roads in each section new SectionRoadGenerator(GeneratedMap.MapSections); return(GeneratedMap); }