diff options
author | Gone2Daly <71726742+Gone2Daly@users.noreply.github.com> | 2023-04-05 01:04:40 +0200 |
---|---|---|
committer | Gone2Daly <71726742+Gone2Daly@users.noreply.github.com> | 2023-04-05 01:04:40 +0200 |
commit | d3c7e9b27ba60550b23efb9e37cc66b91de0c795 (patch) | |
tree | 0f753afd37019984e18ca3cac74a650c7d3c040f /extension/src/openvic2/Map.cpp | |
parent | c7def7396da00b39eced666ad360397733712bfd (diff) |
Adding province overview panel and selection of province.
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 |