public static void Run()
        {
            var map            = new TunnelMap();
            var entranceCoords = map.GetCoordsAt('@');

            Console.WriteLine("EntranceCoords: " + entranceCoords);
            var test = map.MapKeysAndDoorsInSight(entranceCoords);
            // Look by traversing: Where is next key
            // where equivalent door is in sight (record equivalent door)
            // If multiple, select shortest path
            // Actually Traverse to selected key (record steps)
            // When at key, set door as unlocked
            // Repeat
        }
Exemple #2
0
        public override void First()
        {
            map = new TunnelMap("Day18/tunnels.txt");
            //var keys = map.FindKeys();
            //var reach = keys.ToDictionary(k => k.Key, k => map.ReachFrom(k.Value));

            var totalDist = 0;

            map.debugplot = PlotMode.None;
            var origin = map.Find('@');

            map.Set(origin, '.');
            var bestof = DoReach(origin);
        }