From 86e558e69aa5c34395d5f3b17566cf5ad2731af5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 27 Dec 2023 20:08:03 +0000 Subject: Made ProvinceSet use Province const* and updated Region loading --- src/openvic-simulation/map/State.hpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/openvic-simulation/map/State.hpp') 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; 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 -- cgit v1.2.3-56-ga3b1