private static void Main() { Console.WriteLine("Name of the world?"); var worldName = Console.ReadLine(); Console.WriteLine("Size of the world?"); var readLine = Console.ReadLine(); // Adding a goto place for easy restart zZz start: var world = new World(); try { var wsize = Convert.ToInt32(readLine); world.Generate(wsize,wsize); } catch (Exception e) { Console.WriteLine("!ERROR! {0}: {1}", e.Source, e.Message); Console.ReadKey(); } finally { // Display Map // Also count the number of of characters to make the map of certain size int counter = 0; Console.Clear(); Console.BackgroundColor = ConsoleColor.Cyan; Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine("Welcome to {0}",worldName); Console.BackgroundColor = ConsoleColor.Black; for (int i = 0; i < world.SizeX; i++) { for (int j = 0; j < world.SizeY; j++) { if (counter == (world.SizeX)*2) { Console.WriteLine(""); counter = 0; } counter++; Console.ForegroundColor = world.TileToColor(world.IntToTile(world.Map[i, j])); Console.Write(world.TileToChar(world.IntToTile((world.Map[i, j])))); } } Random r = new Random(); int rMax = r.Next(world.SizeX - 1); int yMax = r.Next((world.SizeY/2) - 1); world.GenerateHouse(rMax,yMax); Console.ReadKey(); Console.Clear(); } goto start; }