diff options
author | Steve Frampton <40193522+FarmingtonS9@users.noreply.github.com> | 2023-08-20 19:17:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-20 19:17:17 +0200 |
commit | bec619fc8f554cb075fcef2428f3b6bdb5e88e82 (patch) | |
tree | 826be63abdae21b49b4b2d02b98fc9adbe806227 /src/openvic/pop/Pop.hpp | |
parent | 383ef70bea656a77e8b7c6843fd4a79705ecde49 (diff) |
Added pop properties + changes to pop_size_t type (#13)
* Added additional pop properties
REQ POP-34, POP-35, POP-36, POP-37.
Introducing new PopType properties for purpose of developing initial promotion system.
* Addendum to previous commit
Forgot to save file. Previous statement still accurate.
* Added additional pop properties
REQ POP-34, POP-35, POP-36, POP-37.
Introducing new PopType properties for purpose of developing initial promotion system.
* Addendum to previous commit
Forgot to save file. Previous statement still accurate.
* Changed pop_size_t to int64 type
Modified pop_size_t to be an int64, consolidating u_int32_t and int32_t.
* Move PopType struct attributes to Pop struct attributes
Moved:
- num_promoted
- num_demoted
- num_migrated
attributes to Pop struct from PopType struct.
Added relevant parameters to Pop constructor.
Fixed/moved related functions to Pop struct.
* Updated/fixed previous commit
Removed parameters from Pop construct.
Diffstat (limited to 'src/openvic/pop/Pop.hpp')
-rw-r--r-- | src/openvic/pop/Pop.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/openvic/pop/Pop.hpp b/src/openvic/pop/Pop.hpp index 5bd1b90..db9633f 100644 --- a/src/openvic/pop/Pop.hpp +++ b/src/openvic/pop/Pop.hpp @@ -15,13 +15,13 @@ namespace OpenVic { struct Pop { friend struct PopManager; - using pop_size_t = uint32_t; + using pop_size_t = int64_t; private: PopType const& type; Culture const& culture; Religion const& religion; - pop_size_t size; + pop_size_t size, num_migrated, num_promoted, num_demoted, num_migrated; Pop(PopType const& new_type, Culture const& new_culture, Religion const& new_religion, pop_size_t new_size); @@ -35,6 +35,10 @@ namespace OpenVic { Culture const& get_culture() const; Religion const& get_religion() const; pop_size_t get_size() const; + pop_size_t get_num_promoted() const; + pop_size_t get_num_demoted() const; + pop_size_t get_num_migrated() const; + pop_size_t get_pop_daily_change() const; }; /* REQUIREMENTS: @@ -63,6 +67,7 @@ namespace OpenVic { public: PopType(PopType&&) = default; + strata_t get_strata() const; sprite_t get_sprite() const; Pop::pop_size_t get_max_size() const; Pop::pop_size_t get_merge_max_size() const; |