#pragma once #include #include "Pathfinder.h" class DijkstraPathfinder : public Pathfinder { using Pathfinder::Pathfinder; public: virtual void find_between(const XY &, const XY &); virtual const Path & get_path(); protected: virtual void clear(); private: Path solution; XY end; struct Node { unsigned int distance = -1; XY parent; }; Node & map_get(const XY &); std::unordered_map map; void dijkstra(const XY &); };