diff options
author | hop311 <hop3114@gmail.com> | 2023-12-27 21:08:03 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-27 21:19:54 +0100 |
commit | 86e558e69aa5c34395d5f3b17566cf5ad2731af5 (patch) | |
tree | 78e0431edc32edb50be206ad78064eb28879342a /src/openvic-simulation/map/State.hpp | |
parent | cc808c115d8ec6c7b6e47db47f81395b4d52941f (diff) |
Made ProvinceSet use Province const* and updated Region loading
Diffstat (limited to 'src/openvic-simulation/map/State.hpp')
-rw-r--r-- | src/openvic-simulation/map/State.hpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/openvic-simulation/map/State.hpp b/src/openvic-simulation/map/State.hpp index bb23b2d..bae83f7 100644 --- a/src/openvic-simulation/map/State.hpp +++ b/src/openvic-simulation/map/State.hpp @@ -21,22 +21,16 @@ namespace OpenVic { ); }; - inline bool operator==(const State& lhs, const State& rhs) { - return (lhs.get_owner() == rhs.get_owner() && lhs.get_colony_status() == rhs.get_colony_status()); - } - struct StateSet { using states_t = std::deque<State>; private: Region const& PROPERTY(region); - states_t states; + states_t PROPERTY(states); public: - StateSet(Region const& new_region); + StateSet(Map& map, Region const& new_region); - bool add_state(State&& state); - bool remove_state(State const* state); states_t& get_states(); }; @@ -49,6 +43,6 @@ namespace OpenVic { /* Creates states from current province gamestate & regions, sets province state value. * After this function, the `regions` property is unmanaged and must be carefully updated and * validated by functions that modify it. */ - void generate_states(Map const& map); + void generate_states(Map& map); }; } // namespace OpenVic |