public Bitmap GetGraphicalMaze(bool includeHeatMap = false)
        {
            LogEnterMethod();
            var result = wrappedGenerator.GetGraphicalMaze(includeHeatMap);

            LogExitMethod();
            return(result);
        }
예제 #2
0
        private static void CreateAndShowMaze(IMazeGenerator generator)
        {
            var textMaze = generator.GetTextMaze(true);

            Console.WriteLine(textMaze);

            var graphicMaze = generator.GetGraphicalMaze(true);

            graphicMaze.Save("maze.png");
            Process p = new Process();

            p.StartInfo.FileName = "maze.png";
            p.Start();
        }
예제 #3
0
        private static void CreateAndShowMaze(IMazeGenerator generator)
        {
            generator.GenerateMaze();

            string textMaze = generator.GetTextMaze(true);

            Console.WriteLine(textMaze);

            Bitmap graphicMaze = generator.GetGraphicalMaze(true);

            graphicMaze.Save("maze.png", ImageFormat.Png);
            Process p = new Process();

            p.StartInfo.UseShellExecute = true;
            p.StartInfo.FileName        = "maze.png";
            p.Start();
        }
예제 #4
0
        private static void CreateAndShowMaze(IMazeGenerator generator)
        {
            generator.GenerateMaze();

            var textMaze = generator.GetTextMaze(true);

            Console.WriteLine(textMaze);

            var graphicMaze = generator.GetGraphicalMaze(true);

            graphicMaze.Save("maze.png");

            // This code is Windows-only
            // Comment out the following if building on macOS or Linux
            // The "maze.png" file can be located in the output
            // folder: [solutionlocation]/DrawMaze/bin/Debug/netcore3.1/
            Process p = new Process();

            p.StartInfo.UseShellExecute = true;
            p.StartInfo.FileName        = "maze.png";
            p.Start();
        }