diff options
Diffstat (limited to 'PathfindingContext.h')
-rw-r--r-- | PathfindingContext.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/PathfindingContext.h b/PathfindingContext.h index 7c7f173..bb6fc23 100644 --- a/PathfindingContext.h +++ b/PathfindingContext.h @@ -1,6 +1,7 @@ #pragma once #include <memory> +#include <unordered_map> #include <vector> #include "XY.h" @@ -17,10 +18,16 @@ public: const XY & get_start() { return this->start_point; } void set_end(const XY & point); const XY & get_end() { return this->end_point; } - bool valid_point(const XY & point); + bool empty_point(const XY & point); void update(); +public: + void register_weight(const std::string & type, unsigned int weight); + unsigned int get_weight(const std::string & type); +private: + std::unordered_map<std::string, unsigned int> weight_map; + private: XY start_point = { -1, -1 }; XY end_point = { -1, -1 }; |