#pragma once #include #include #include #include "XY.h" #include "Pathfinder.h" class Museum; class PathfindingContext { public: PathfindingContext(Museum &); void update(); private: XY start_point = { -1, -1 }; XY end_point = { -1, -1 }; public: void set_start(const XY & point); const XY & get_start() { return this->start_point; } void set_end(const XY & point); const XY & get_end() { return this->end_point; } public: bool empty_point(const XY & point); public: void register_weight(const std::string & type, unsigned int weight); unsigned int get_weight(const std::string & type); private: std::unordered_map weight_map; public: Pathfinder & get_solver(); void cycle_solver(); private: std::vector> solvers; size_t solver_index = 0; public: bool has_collision = false; private: Museum & museum; };