From faa82f0a6004026c94a6415baf5e138b48dc1629 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 24 Oct 2024 18:32:55 +0200 Subject: implement weird dijkstra --- PathfindingContext.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'PathfindingContext.h') 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 +#include #include #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 weight_map; + private: XY start_point = { -1, -1 }; XY end_point = { -1, -1 }; -- cgit v1.2.3