Exemple #1
0
        static void Main(string[] args)
        {
            string filePath = string.Empty;

            if (args.Length == 0)
            {
                filePath = "tree.txt";
            }
            else
            {
                filePath = args[0];
            }

            Stopwatch watch = Stopwatch.StartNew();

            AppFacade facade = new AppFacade();

            try
            {
                TrianglePath trianglePath = facade.RunMinimumPathFinding(new FileDataProvider(filePath));

                Console.WriteLine("Minimal " + trianglePath.ToString());
            }
            catch (Exception e)
            {
                Console.WriteLine("There was an error: {0}", e.Message.ToString());
            }

            watch.Stop();

            Debug.WriteLine(watch.Elapsed);

            Console.ReadKey();
        }