#pragma once #include #include #include "XY.h" class Museum; class Canvas; class Pathfinder { public: typedef std::forward_list Path; public: Pathfinder(Museum &); virtual void find_between(const XY &, const XY &) = 0; virtual bool is_visited(const XY &); virtual bool is_solution(const XY &); virtual bool is_solved() { return this->solved; } virtual const Path & get_solution() { return this->path; } protected: virtual void clear(); virtual void set_visited(const XY &); virtual void set_solved(const Path &); private: size_t pos_to_idx(const XY &); std::vector visisted; std::vector solution; Path path; bool solved = false; protected: Museum & museum; };