public string GetTextMaze(bool includePath = false) { LogEnterMethod(); var result = wrappedGenerator.GetTextMaze(includePath); LogExitMethod(); return(result); }
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(); }
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(); }
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(); }