diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 14:44:20 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 14:44:20 +0200 |
commit | afc66d3013b7d47c6c22d6a99809bc3e7d1ff0dc (patch) | |
tree | de50baa5d2f87cc8a416cbd321f7c7f430b03613 /PathfindingContext.h | |
parent | 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 (diff) |
implement breadth-first search pathfinding
Diffstat (limited to 'PathfindingContext.h')
-rw-r--r-- | PathfindingContext.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/PathfindingContext.h b/PathfindingContext.h index 19fd93d..7c7f173 100644 --- a/PathfindingContext.h +++ b/PathfindingContext.h @@ -1,6 +1,10 @@ #pragma once +#include <memory> +#include <vector> + #include "XY.h" +#include "Pathfinder.h" class Museum; @@ -15,10 +19,19 @@ public: const XY & get_end() { return this->end_point; } bool valid_point(const XY & point); + void update(); + private: XY start_point = { -1, -1 }; XY end_point = { -1, -1 }; +public: + Pathfinder & get_solver(); + void cycle_solver(); +private: + std::vector<std::unique_ptr<Pathfinder>> solvers; + size_t solver_index = 0; + private: Museum & museum; }; |