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);
Dictionary<UInt64, Graph.Node> 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();
using Graph;
using Logging;
using astar;
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));