aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/map/Province.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-07-26 22:37:25 +0200
committer Hop311 <hop3114@gmail.com>2023-07-26 22:37:25 +0200
commit532c9be36ca03ee13c92ca7d895aaf5b42eeb034 (patch)
treea91587787bf6742168279ac41f77b9ebabe0dffe /src/openvic/map/Province.hpp
parent0422f9fbb06e911a7cf6da11045b47cdda0d2d06 (diff)
Added pops to provinces
Diffstat (limited to 'src/openvic/map/Province.hpp')
-rw-r--r--src/openvic/map/Province.hpp10
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);
};