diff options
Diffstat (limited to 'extension/src/openvic2/Province.cpp')
-rw-r--r-- | extension/src/openvic2/Province.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/extension/src/openvic2/Province.cpp b/extension/src/openvic2/Province.cpp index 49f1b0e..7d55708 100644 --- a/extension/src/openvic2/Province.cpp +++ b/extension/src/openvic2/Province.cpp @@ -1,4 +1,4 @@ -#include "Map.hpp" +#include "Province.hpp" #include <cassert> #include <sstream> @@ -7,9 +7,8 @@ using namespace OpenVic2; Province::Province(index_t new_index, std::string const& new_identifier, colour_t new_colour) : - index(new_index), identifier(new_identifier), colour(new_colour) { + HasIdentifier(new_identifier), index(new_index), colour(new_colour) { assert(index != NULL_INDEX); - assert(!identifier.empty()); assert(colour != NULL_COLOUR); } @@ -23,10 +22,6 @@ Province::index_t Province::get_index() const { return index; } -std::string const& Province::get_identifier() const { - return identifier; -} - Province::colour_t Province::get_colour() const { return colour; } @@ -35,6 +30,14 @@ Region* Province::get_region() const { return region; } +bool Province::is_water() const { + return water; +} + +Province::life_rating_t Province::get_life_rating() const { + return life_rating; +} + std::string Province::to_string() const { - return "(#" + std::to_string(index) + ", " + identifier + ", 0x" + colour_to_hex_string(colour) + ")"; + return "(#" + std::to_string(index) + ", " + get_identifier() + ", 0x" + colour_to_hex_string(colour) + ")"; } |