From 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 23 Oct 2024 19:16:19 +0200 Subject: add XY struct for 2d points and offsets --- PathfindingContext.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'PathfindingContext.h') 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 +#include "XY.h" class Museum; @@ -9,15 +9,15 @@ public: PathfindingContext(Museum &); public: - void set_start(const std::pair & point); - const std::pair & get_start() { return this->start_point; } - void set_end(const std::pair & point); - const std::pair & get_end() { return this->end_point; } - bool valid_point(const std::pair & 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 start_point = { -1, -1 }; - std::pair end_point = { -1, -1 }; + XY start_point = { -1, -1 }; + XY end_point = { -1, -1 }; private: Museum & museum; -- cgit v1.2.3