diff options
author | Hop311 <hop3114@gmail.com> | 2023-04-23 20:49:01 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-04-23 20:49:01 +0200 |
commit | d3f3187209cb4085f27f95ce8ad2a77af25704fd (patch) | |
tree | 60971db586e78761341f2b48110d149b1ba0db9d /extension/src/openvic2/Region.cpp | |
parent | 1084a5d64df5d3465ef90b3b85fe3374636a3fe8 (diff) |
C++ refactoring + simulation prototype
Diffstat (limited to 'extension/src/openvic2/Region.cpp')
-rw-r--r-- | extension/src/openvic2/Region.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/extension/src/openvic2/Region.cpp b/extension/src/openvic2/Region.cpp deleted file mode 100644 index 67a75a9..0000000 --- a/extension/src/openvic2/Region.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "Region.hpp" - -#include <cassert> -#include <algorithm> - -using namespace OpenVic2; - -size_t ProvinceSet::get_province_count() const { - return provinces.size(); -} - -bool ProvinceSet::contains_province(Province const* province) const { - return province && std::find(provinces.begin(), provinces.end(), province) != provinces.end(); -} - -std::set<Province*> const& ProvinceSet::get_provinces() const { - return provinces; -} - -Region::Region(std::string const& new_identifier) : HasIdentifier(new_identifier) {} - -Province::colour_t Region::get_colour() const { - if (provinces.empty()) return 0xFF0000; - Province const* province = *provinces.cbegin(); - return province->get_colour(); -} |