#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 { XY parent; unsigned int cost = -1; }; Node & map_get(const XY &); std::unordered_map map; void explore(const XY &, unsigned int cost = 0); };