aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Map.hpp
diff options
context:
space:
mode:
author zaaarf <80046572+zaaarf@users.noreply.github.com>2024-01-02 15:48:56 +0100
committer GitHub <noreply@github.com>2024-01-02 15:48:56 +0100
commit791e64795a5f688e5ae673b88c5f2787d6450ce8 (patch)
treecf9324311fb1b49a09ccc17dc8f2ba4d24fae538 /src/openvic-simulation/map/Map.hpp
parent4c8da86c3bede8834f381fa63edaa3e140131f69 (diff)
parent2f5706fd5ef6bbdee54c82860e03f00a96751693 (diff)
Merge pull request #114 from OpenVicProject/squared-roots
Integer and fixed point squared roots
Diffstat (limited to 'src/openvic-simulation/map/Map.hpp')
-rw-r--r--src/openvic-simulation/map/Map.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp
index 33ca4b2..a472a6c 100644
--- a/src/openvic-simulation/map/Map.hpp
+++ b/src/openvic-simulation/map/Map.hpp
@@ -5,6 +5,7 @@
#include <openvic-dataloader/csv/LineObject.hpp>
+#include "openvic-simulation/map/Province.hpp"
#include "openvic-simulation/map/Region.hpp"
#include "openvic-simulation/map/State.hpp"
#include "openvic-simulation/map/TerrainType.hpp"
@@ -89,6 +90,13 @@ namespace OpenVic {
bool add_province(std::string_view identifier, colour_t colour);
IDENTIFIER_REGISTRY_NON_CONST_ACCESSORS_CUSTOM_INDEX_OFFSET(province, 1);
+ Province::distance_t calculate_distance_between(Province const& from, Province const& to) const;
+ bool add_standard_adjacency(Province& from, Province& to) const;
+ bool add_special_adjacency(
+ Province& from, Province& to, Province::adjacency_t::type_t type, Province const* through,
+ Province::adjacency_t::data_t data
+ ) const;
+
/* This provides a safe way to remove the const qualifier of a Province const*, via a non-const Map.
* It uses a const_cast (the fastest/simplest solution), but this could also be done without it by looking up the
* Province* using the Province const*'s index. Requiring a non-const Map ensures that this function can only be