diff --git a/Executable/Program.cs b/Executable/Program.cs index 0d61c04..cbc5daa 100644 --- a/Executable/Program.cs +++ b/Executable/Program.cs @@ -1,5 +1,19 @@ -Logging.Logger logger = new (Logging.LogType.CONSOLE, Logging.LogLevel.DEBUG); -Dictionary nodes = OpenStreetMap_Importer.Importer.Import(@"C:\Users\glax\Downloads\oberbayern-latest.osm", logger); -logger.level = Logging.LogLevel.VERBOSE; -astar.Astar astar = new(nodes, logger); -Console.ReadKey(); \ No newline at end of file +using Graph; +using Logging; +using astar; + +Logger logger = new (LogType.CONSOLE, LogLevel.DEBUG); +Dictionary graph = OpenStreetMap_Importer.Importer.Import(@"", true, logger); +logger.level = LogLevel.DEBUG; + +Random r = new(); +List path; +Node n1, n2; +do +{ + do + { + n1 = graph[graph.Keys.ElementAt(r.Next(0, graph.Count - 1))]; + n2 = graph[graph.Keys.ElementAt(r.Next(0, graph.Count - 1))]; + } while (!Astar.FindPath(ref graph, n1, n2, out path, logger)); +} while (Console.ReadKey().Key.Equals(ConsoleKey.Enter)); \ No newline at end of file