aboutsummaryrefslogtreecommitdiff
path: root/BreadthFirstPathfinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'BreadthFirstPathfinder.h')
-rw-r--r--BreadthFirstPathfinder.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/BreadthFirstPathfinder.h b/BreadthFirstPathfinder.h
new file mode 100644
index 0000000..ba05f70
--- /dev/null
+++ b/BreadthFirstPathfinder.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "Pathfinder.h"
+
+#include <vector>
+
+class BreadthFirstPathfinder : public Pathfinder {
+ using Pathfinder::Pathfinder;
+
+public:
+ virtual void find_between(const XY &, const XY &);
+ virtual const Path & get_path();
+
+private:
+ std::vector<Path> find_step(const std::vector<Path> &);
+ Path solution;
+
+ XY end;
+
+protected:
+ virtual void clear();
+
+};
+