city-generation/Game/Assets/Scripts/Generator/CityGenerator.cs

44 lines
1.1 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TransportGame.Generator;
using TransportGame.Model;
using TransportGame.Utils;
namespace TransportGame.Generator
{
/// <summary>
/// Complete city generator. Generates everything, from terrain to buildings
/// </summary>
public class CityGenerator
{
/// <summary>
/// Generates a city
/// </summary>
/// <param name="width">Width</param>
/// <param name="height">Height</param>
/// <returns>City</returns>
public Map Generate(int width, int height)
{
Map map;
// Generate terrain
TerrainGenerator terrainGen = new TerrainGenerator();
map = terrainGen.Generate(width, height);
// Generate population map
PopulationCentersGenerator populationGen = new PopulationCentersGenerator();
populationGen.Generate(map);
// Generate roads
// TODO: Generate roads
Logger.DumpMap(map, "withpop.map");
// Done
return map;
}
}
}