Beispiel #1
0
        static void Main(string[] args)
        {
            int       size = RequestInt("What size would you like the labyrinth to be ?");
            Labyrinth lab  = new Labyrinth(size);

            lab.Start  = RequestCoordinates(size, "Where would you like to start?");
            lab.Finish = RequestCoordinates(size, "Where would you like to finish?");

            lab.GeneratePath();
            lab.Print();

            Console.ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            int       size = 20;
            Labyrinth lab  = new Labyrinth(size, size / 2);



            lab.GeneratePath(lab.Grid[0, 0], lab.Grid[size - 1, size / 2 - 1]);
            lab.Print();
            Console.ReadKey();

            lab.Fill();
            lab.Print();
            Console.ReadKey();
        }