diff options
Diffstat (limited to 'extension/src/openvic2/Map.cpp')
-rw-r--r-- | extension/src/openvic2/Map.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extension/src/openvic2/Map.cpp b/extension/src/openvic2/Map.cpp index c53b86d..40c421a 100644 --- a/extension/src/openvic2/Map.cpp +++ b/extension/src/openvic2/Map.cpp @@ -26,4 +26,12 @@ bool Map::add_province(std::string const& identifier, Province::colour_t colour, provinces.push_back(new_province); error_message = "Added province: " + new_province.to_string(); return true; +} + +Province Map::get_province(Province::colour_t colour) { + for(Province const& province : provinces) { + if (province.colour == colour) { + return province; + } + } }
\ No newline at end of file |