Different Call

This commit is contained in:
C9Glax 2022-11-01 05:08:52 +01:00
parent 681cb25ecf
commit 7e8d8e2a74

View File

@ -1,5 +1,19 @@
Logging.Logger logger = new (Logging.LogType.CONSOLE, Logging.LogLevel.DEBUG); using Graph;
Dictionary<UInt64, Graph.Node> nodes = OpenStreetMap_Importer.Importer.Import(@"C:\Users\glax\Downloads\oberbayern-latest.osm", logger); using Logging;
logger.level = Logging.LogLevel.VERBOSE; using astar;
astar.Astar astar = new(nodes, logger);
Console.ReadKey(); Logger logger = new (LogType.CONSOLE, LogLevel.DEBUG);
Dictionary<ulong, Node> graph = OpenStreetMap_Importer.Importer.Import(@"", true, logger);
logger.level = LogLevel.DEBUG;
Random r = new();
List<Node> 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));