public override object GiveAnswer2() { var map = new Dictionary <(int x, int y), List <string> >(); var tilesToDo = _tiles.Keys.ToList(); var fullMap = new List <string>(); var tile = tilesToDo[0]; AddMap(tile, 2, 1, map, (0, 0), tilesToDo); var minX = map.Min(t => t.Key.x); var maxX = map.Max(t => t.Key.x); var minY = map.Min(t => t.Key.y); var maxY = map.Max(t => t.Key.y); var mapSize = _tiles.First().Value.Count; var builder = new StringBuilder(); for (var y = minY; y <= maxY; y++) { for (var line = 0; line < mapSize; line++) { for (var x = minX; x <= maxX; x++) { builder.Append(map[(x, y)][line].Substring(1, mapSize - 2));
public RedirectToRouteResult AddMap(AddMap model) { var mapId = Guid.NewGuid(); // For now: Do our best not to redirect to nowhere or yellow-screen-of-death mapId = FacilitiesSingleton.Facilities.GetChildren(model.BuildingId).First().Item1; return(this.RedirectToAction <MapController>(c => c.Details(mapId))); }