Exemple #1
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.WriteLine("Enter the full input file name:");

                var fileName = Console.ReadLine();

                MazeSolver solver = new MazeSolver();
                solver.Solve(fileName);
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.White;

            MazeGen  maze     = new MazeGen();
            MazeData mazeData = maze.Generate();

            MazeSolver mazeSolver = new MazeSolver(mazeData);

            mazeSolver.Solve();

            Console.ReadLine();
        }
Exemple #3
0
        static void Main()
        {
            string str;

            for (; (str = Console.ReadLine()) != null;)
            {
                string[] args = str.Split(' ');
                int      x    = int.Parse(args[0]);
                int      y    = int.Parse(args[1]);

                var        sw     = Stopwatch.StartNew();
                MazeSolver solver = new MazeSolver();
                Maze       ans    = solver.Solve(new Maze(x, y));
                sw.Stop();
                PrintResult(sw.ElapsedMilliseconds, solver.cntGoal, solver.minBent);    // debug
                //Console.WriteLine(solver.minBent);        // 回答
            }
        }