diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
commit | 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 (patch) | |
tree | f1709c2e9565d78c791653e71e6a4b26b3138423 /PathfindingContext.h | |
parent | 277157b3e06b2deeacbdbc8bf6190de19f88169d (diff) |
add XY struct for 2d points and offsets
Diffstat (limited to 'PathfindingContext.h')
-rw-r--r-- | PathfindingContext.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/PathfindingContext.h b/PathfindingContext.h index ce46a55..19fd93d 100644 --- a/PathfindingContext.h +++ b/PathfindingContext.h @@ -1,6 +1,6 @@ #pragma once -#include <utility> +#include "XY.h" class Museum; @@ -9,15 +9,15 @@ public: PathfindingContext(Museum &); public: - void set_start(const std::pair<int, int> & point); - const std::pair<int, int> & get_start() { return this->start_point; } - void set_end(const std::pair<int, int> & point); - const std::pair<int, int> & get_end() { return this->end_point; } - bool valid_point(const std::pair<int, int> & point); + void set_start(const XY & point); + 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); private: - std::pair<int, int> start_point = { -1, -1 }; - std::pair<int, int> end_point = { -1, -1 }; + XY start_point = { -1, -1 }; + XY end_point = { -1, -1 }; private: Museum & museum; |