appropriate names in PathResult for nodes gSCoreNodes

This commit is contained in:
2023-04-19 22:02:15 +02:00
parent 055a751c9d
commit 9e0c4f65db
2 changed files with 6 additions and 6 deletions

View File

@ -33,10 +33,10 @@ public static class Pathfinder
{
Console.WriteLine("Path found.");
PathResult path = GetPath(cameFromDict, goalNode, regionManager, DateTime.Now - startCalc);
path.AddGScores(gScore);
string fileName = $"{new DirectoryInfo(workingDir).Name}-{DateTime.Now.ToFileTime()}.result";
string outputFilepath = Path.Join(Directory.GetParent(workingDir)!.FullName, fileName);
path.name = outputFilepath;
path.AddGScores(gScore);
SaveGraph(path, outputFilepath);
return path;
}