From dabfb8188aab86ea8d8c9794ee8e46f6e22291f4 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 24 Oct 2024 20:46:43 +0200 Subject: fix dijkstra but efficient this time --- DijkstraPathfinder.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DijkstraPathfinder.h') 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 map; -- cgit v1.2.3