private static void RunRealWorldCreator() { var creator = new RealWorldCreator() { Height = 100, Width = 100, NumberOfPlates = 12 }; Stopwatch watch = new Stopwatch(); watch.Start(); creator.CreateWorld(); watch.Stop(); Console.WriteLine(watch.ElapsedMilliseconds); Bitmap tectonicMap = BitmapGenerator.GetTectonicMap(creator.Width, creator.Height, creator.MapData.Tiles); BitmapHelpers.ShowBitmap(tectonicMap); Bitmap heightMap = BitmapGenerator.GetHeightMap(creator.Width, creator.Height, creator.MapData.Tiles); BitmapHelpers.ShowBitmap(heightMap); Bitmap landMap = BitmapGenerator.GetLandMap(creator.Width, creator.Height, creator.MapData); BitmapHelpers.ShowBitmap(landMap); }
public static Bitmap GetTectonicMap(int width, int height, Tile[,] tiles) { return(BitmapGenerator.GetTectonicMap(width, height, tiles, tiles.AsList().Select(x => x.PlateId).Distinct().Count())); }