aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/Province.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-04-18 19:55:10 +0200
committer GitHub <noreply@github.com>2023-04-18 19:55:10 +0200
commitea077c8a7c78477bd247c7fbd21de13bcf2285e9 (patch)
tree0cc2be6ef3ab1f2af5c2806f60abe988ca6aa7b5 /extension/src/openvic2/Province.cpp
parent258a088018d36e987b3ffe4a9b418a6c21ad9217 (diff)
parent1fdd198f943a41468b03b2cdc62c24147f707239 (diff)
Merge pull request #88 from OpenVic2Project/map-drawing
Further Map Stuff
Diffstat (limited to 'extension/src/openvic2/Province.cpp')
-rw-r--r--extension/src/openvic2/Province.cpp19
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) + ")";
}