diff options
author | Hop311 <Hop3114@gmail.com> | 2023-07-28 00:10:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 00:10:46 +0200 |
commit | 8a08be3e7e8477973e243716d431ad7117acfa43 (patch) | |
tree | a91587787bf6742168279ac41f77b9ebabe0dffe /src/openvic/map/Province.hpp | |
parent | 420c2dce47e74c01ff46be991058d543e0c70a6b (diff) | |
parent | 532c9be36ca03ee13c92ca7d895aaf5b42eeb034 (diff) |
Merge pull request #9 from OpenVicProject/pops
Pops and other bits
Diffstat (limited to 'src/openvic/map/Province.hpp')
-rw-r--r-- | src/openvic/map/Province.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openvic/map/Province.hpp b/src/openvic/map/Province.hpp index f1f87a2..cd90f7d 100644 --- a/src/openvic/map/Province.hpp +++ b/src/openvic/map/Province.hpp @@ -1,5 +1,6 @@ #pragma once +#include "../pop/Pop.hpp" #include "Building.hpp" namespace OpenVic { @@ -24,6 +25,9 @@ namespace OpenVic { // TODO - change this into a factory-like structure Good const* rgo = nullptr; + std::vector<Pop> pops; + Pop::pop_size_t total_population; + Province(index_t new_index, std::string const& new_identifier, colour_t new_colour); public: @@ -33,7 +37,7 @@ namespace OpenVic { Region* get_region() const; bool is_water() const; life_rating_t get_life_rating() const; - return_t add_building(BuildingType const& type); + return_t add_building(Building&& building); void lock_buildings(); void reset_buildings(); Building const* get_building_by_identifier(std::string const& identifier) const; @@ -42,6 +46,10 @@ namespace OpenVic { Good const* get_rgo() const; std::string to_string() const; + void add_pop(Pop&& pop); + void update_total_population(); + Pop::pop_size_t get_total_population() const; + void update_state(Date const& today); void tick(Date const& today); }; |