diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 20:46:43 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 20:46:43 +0200 |
commit | dabfb8188aab86ea8d8c9794ee8e46f6e22291f4 (patch) | |
tree | 492f8139c36aa8dc117a7c0de9162a89501c1d84 /DijkstraPathfinder.h | |
parent | 2502246d8b08e8660dd08e2c2089c2ef2cf3458b (diff) |
fix dijkstra but efficient this time
Diffstat (limited to 'DijkstraPathfinder.h')
-rw-r--r-- | DijkstraPathfinder.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/DijkstraPathfinder.h b/DijkstraPathfinder.h index eddb26f..5fb1e21 100644 --- a/DijkstraPathfinder.h +++ b/DijkstraPathfinder.h @@ -22,6 +22,11 @@ private: unsigned int distance = -1; XY parent; }; + struct Neighbor { + unsigned int distance = -1; + XY position; + }; + Node & map_get(const XY &); std::unordered_map<XY, Node> map; |