diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-25 13:02:38 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-25 13:02:38 +0200 |
commit | 8cf389aaf748c77aecda0b3a3773c45053b0f231 (patch) | |
tree | 91268879710d6ae2868e548d3f44c664a19443d8 /Pathfinder.h | |
parent | da669db4f083194bc78358041c5d9929e103ac9f (diff) |
implement all ALGA features
Diffstat (limited to 'Pathfinder.h')
-rw-r--r-- | Pathfinder.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Pathfinder.h b/Pathfinder.h index 9c362dc..503423e 100644 --- a/Pathfinder.h +++ b/Pathfinder.h @@ -16,16 +16,24 @@ public: Pathfinder(Museum &); virtual void find_between(const XY &, const XY &) = 0; - virtual const Path & get_path() = 0; - virtual bool is_visited(const XY &); + 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 clear(); + virtual void set_visited(const XY &); + virtual void set_solved(const Path &); private: + size_t pos_to_idx(const XY &); std::vector<bool> visisted; + std::vector<bool> solution; + Path path; + bool solved = false; protected: Museum & museum; |