aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/map/Building.hpp
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-05-02 11:25:32 +0200
committer GitHub <noreply@github.com>2023-05-02 11:25:32 +0200
commit9f772a314dc130df95fe5e3b018a9ba60e5be5b1 (patch)
treeab138ae3c615adeb51972b4bfff992dea86cd69c /extension/src/openvic2/map/Building.hpp
parentbe43b260128664756054a289cf9d22319def1f8a (diff)
parent112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (diff)
Merge pull request #97 from Spartan322/update/clang-format
Diffstat (limited to 'extension/src/openvic2/map/Building.hpp')
-rw-r--r--extension/src/openvic2/map/Building.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/extension/src/openvic2/map/Building.hpp b/extension/src/openvic2/map/Building.hpp
index 78d08ae..492cbc6 100644
--- a/extension/src/openvic2/map/Building.hpp
+++ b/extension/src/openvic2/map/Building.hpp
@@ -2,8 +2,8 @@
#include <vector>
-#include "../Types.hpp"
#include "../Date.hpp"
+#include "../Types.hpp"
namespace OpenVic2 {
struct Province;
@@ -19,7 +19,13 @@ namespace OpenVic2 {
using level_t = int8_t;
- enum class ExpansionState { CannotExpand, CanExpand, Preparing, Expanding };
+ enum class ExpansionState {
+ CannotExpand,
+ CanExpand,
+ Preparing,
+ Expanding
+ };
+
private:
BuildingType const& type;
level_t level = 0;
@@ -30,6 +36,7 @@ namespace OpenVic2 {
Building(BuildingType const& new_type);
bool _can_expand() const;
+
public:
Building(Building&&) = default;
@@ -49,11 +56,13 @@ namespace OpenVic2 {
struct BuildingType : HasIdentifier {
friend struct BuildingManager;
+
private:
const Building::level_t max_level;
const Timespan build_time;
BuildingType(std::string const& new_identifier, Building::level_t new_max_level, Timespan new_build_time);
+
public:
BuildingType(BuildingType&&) = default;
@@ -64,6 +73,7 @@ namespace OpenVic2 {
struct BuildingManager {
private:
IdentifierRegistry<BuildingType> building_types;
+
public:
BuildingManager();