Relocated Import

This commit is contained in:
C9Glax 2022-05-06 00:40:58 +02:00
parent 66f4641fb7
commit d29ab7e01e
4 changed files with 7 additions and 6 deletions

View File

@ -9,6 +9,8 @@
<ItemGroup>
<ProjectReference Include="..\astar\astar.csproj" />
<ProjectReference Include="..\Graph\Graph.csproj" />
<ProjectReference Include="..\OpenStreetMap Importer\OpenStreetMap Importer.csproj" />
</ItemGroup>
</Project>

View File

@ -1 +1,3 @@
new astar.Astar();
Logging.Logger logger = new Logging.Logger(Logging.LogType.Console, Logging.loglevel.DEBUG);
Dictionary<UInt64, Graph.Node> nodes = OpenStreetMap_Importer.Importer.Import(ref logger);
new astar.Astar(nodes, ref logger);

View File

@ -1,6 +1,5 @@
using Logging;
using Graph;
using OpenStreetMap_Importer;
namespace astar
{
@ -11,10 +10,9 @@ namespace astar
/*
* Loads the graph, chooses two nodes at random and calls a*
*/
public Astar()
public Astar(Dictionary<UInt64, Node> nodes, ref Logger logger)
{
this.logger = new Logger(LogType.Console, loglevel.DEBUG);
Dictionary<UInt64, Node> nodes = Importer.Import(ref logger);
this.logger = logger;
Random r = new Random();
List<Node> path = new List<Node>();
while(path.Count < 1)

View File

@ -9,7 +9,6 @@
<ItemGroup>
<ProjectReference Include="..\Graph\Graph.csproj" />
<ProjectReference Include="..\Logging\Logging.csproj" />
<ProjectReference Include="..\OpenStreetMap Importer\OpenStreetMap Importer.csproj" />
</ItemGroup>
</Project>