diff options
Diffstat (limited to 'src/openvic-simulation/map/Map.hpp')
-rw-r--r-- | src/openvic-simulation/map/Map.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openvic-simulation/map/Map.hpp b/src/openvic-simulation/map/Map.hpp index 3e7ff35..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" @@ -75,7 +76,7 @@ namespace OpenVic { Province::index_t PROPERTY(max_provinces); Province* PROPERTY(selected_province); - Pop::pop_size_t PROPERTY(highest_province_population) + Pop::pop_size_t PROPERTY(highest_province_population); Pop::pop_size_t PROPERTY(total_map_population); Province::index_t get_index_from_colour(colour_t colour) const; @@ -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 |