Example #1
0
        static void RunAllLevels()
        {
            string[] levels = new string[] {
                //"Levels/LA 1.xml","Levels/LA 2.xml","Levels/LA 3.xml","Levels/LA 4.xml",
                //"Levels/LA 6.xml","Levels/LA 7.xml",
                //"Levels/LA 8.xml","Levels/LoZ 1.xml",
                //"Levels/LoZ 2.xml","Levels/LoZ 3.xml","Levels/LoZ 4.xml","Levels/LoZ 5.xml",
                //"Levels/LoZ 7.xml","Levels/LoZ 8.xml","Levels/LoZ 9.xml","Levels/LoZ2 1.xml",
                //"Levels/LoZ2 2.xml","Levels/LoZ2 4.xml","Levels/LoZ2 5.xml","Levels/LoZ2 6.xml",
                //"Levels/LoZ2 7.xml","Levels/LoZ2 8.xml",
                //"Levels/LoZ2 9.xml",
                "Levels/LttP 1.xml",
                //"Levels/LttP 10.xml",
                //"Levels/LttP 11.xml",
                //"Levels/LttP 2.xml","Levels/LttP 3.xml",
                //"Levels/LttP 4.xml","Levels/LttP 5.xml","Levels/LttP 6.xml","Levels/LttP 7.xml",
                //"Levels/LttP 8.xml","Levels/LttP 9.xml",
            };

            foreach (var level in levels)
            {
                Console.WriteLine(level);
                Dungeon     dungeon = new Dungeon(level);
                SearchAgent path    = dungeon.getOptimalPath(level.Contains("LttP"));
                Console.WriteLine(path.pathToString());
                dungeon.UpdateRooms(path);
                string output = level;
                output = Regex.Replace(output, @"Levels", "Summaries");
                output = Regex.Replace(output, " ", "");
                dungeon.WriteStats(output, path);
            }
        }