From 170ee25469322d25931050813a779dfbc2eaa4b0 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 10 Aug 2023 11:32:53 +0100 Subject: Added distributions for pop type and culture --- src/openvic/map/Province.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/openvic/map/Province.hpp') diff --git a/src/openvic/map/Province.hpp b/src/openvic/map/Province.hpp index cd90f7d..3ca5d93 100644 --- a/src/openvic/map/Province.hpp +++ b/src/openvic/map/Province.hpp @@ -11,7 +11,7 @@ namespace OpenVic { /* REQUIREMENTS: * MAP-5, MAP-7, MAP-8, MAP-43, MAP-47 */ - struct Province : HasIdentifier, HasColour { + struct Province : HasIdentifierAndColour { friend struct Map; using life_rating_t = int8_t; @@ -27,6 +27,7 @@ namespace OpenVic { std::vector pops; Pop::pop_size_t total_population; + distribution_t pop_types, cultures; Province(index_t new_index, std::string const& new_identifier, colour_t new_colour); @@ -47,8 +48,11 @@ namespace OpenVic { std::string to_string() const; void add_pop(Pop&& pop); - void update_total_population(); + void clear_pops(); Pop::pop_size_t get_total_population() const; + distribution_t const& get_pop_type_distribution() const; + distribution_t const& get_culture_distribution() const; + void update_pops(); void update_state(Date const& today); void tick(Date const& today); -- cgit v1.2.3-56-ga3b1