Ejemplo n.º 1
0
        static void Main()
        {
            var x        = new int[] { 1, 2, 3 };
            var labirint = new Labirint("input.txt");
            var result   = labirint.SearchPath();

            using (var wr = new StreamWriter("output.txt"))
            {
                wr.WriteLine(result);
            }
            if (result != -1)
            {
                labirint.ShowLabirint();
            }
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            char[,] matrix = new char[, ]
            {
                { 's', ' ', ' ', ' ', ' ', ' ' },
                { ' ', 'x', 'x', 'x', 'x', ' ' },
                { ' ', ' ', 'e', ' ', 'x', ' ' },
                { ' ', 'x', 'x', ' ', 'x', ' ' },
                { ' ', 'x', 'x', ' ', 'x', ' ' },
                { ' ', 'x', 'x', ' ', ' ', ' ' },
            };

            var lab = new Labirint(matrix);

            lab.FindPaths(0, 0, 'S');
        }