public static void MainX() { map = Labirynth.CreateLarge(); Stack <Point> points = new Stack <Point>(); points.Push(new Point { X = 0, Y = 0 }); while (points.Count != 0) { var point = points.Pop(); if (!CanMove(point.X, point.Y)) { continue; } map[point.X, point.Y] = Space.Visited; // Visualize(); points.Push(point.X - 1, point.Y); points.Push(point.X + 1, point.Y); points.Push(point.X, point.Y - 1); points.Push(point.X, point.Y + 1); } }
public static void MainX() { map = Labirynth.CreateLarge(); Go(0, 0); }