aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/map/Building.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-05-22 17:54:15 +0200
committer GitHub <noreply@github.com>2023-05-22 17:54:15 +0200
commit08ec6fe5fbf52d814d88c235aac84bb95ad4e322 (patch)
tree136a221eb5e7c895c8219778b3d206f2ed9e8e7f /src/openvic/map/Building.hpp
parent15e960f93ced8c94a6a45ebb2b44d0705ff7f8f6 (diff)
parent7874702f30d5855319faf197b10aed31f07f5e27 (diff)
Merge pull request #5 from OpenVicProject/bmp
BMP palette parser + code style cleanup
Diffstat (limited to 'src/openvic/map/Building.hpp')
-rw-r--r--src/openvic/map/Building.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/openvic/map/Building.hpp b/src/openvic/map/Building.hpp
index ca5c196..98c3991 100644
--- a/src/openvic/map/Building.hpp
+++ b/src/openvic/map/Building.hpp
@@ -2,8 +2,8 @@
#include <vector>
-#include "../Types.hpp"
#include "../Date.hpp"
+#include "../Types.hpp"
namespace OpenVic {
struct Province;
@@ -19,7 +19,13 @@ namespace OpenVic {
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 OpenVic {
Building(BuildingType const& new_type);
bool _can_expand() const;
+
public:
Building(Building&&) = default;
@@ -49,11 +56,13 @@ namespace OpenVic {
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 OpenVic {
struct BuildingManager {
private:
IdentifierRegistry<BuildingType> building_types;
+
public:
BuildingManager();