summaryrefslogtreecommitdiff
path: root/battles
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-11-08 23:54:23 +0100
committerAki <please@ignore.pl>2022-11-08 23:55:25 +0100
commitcaa48ce5946d093daaf950751dfa1432ea5373a9 (patch)
tree2a5b9d7586ab36a320b50b45175f4b8df46ae085 /battles
parent471bf1adab9022a4261f2f4bc7ce24ce977ccda7 (diff)
downloadkurator-caa48ce5946d093daaf950751dfa1432ea5373a9.zip
kurator-caa48ce5946d093daaf950751dfa1432ea5373a9.tar.gz
kurator-caa48ce5946d093daaf950751dfa1432ea5373a9.tar.bz2
Creating skeleton for battle simulation and universe data
This might be a bit too much and a bit too blindly, but let's see how it evolves.
Diffstat (limited to 'battles')
-rw-r--r--battles/CMakeLists.txt14
-rw-r--r--battles/include/kurator/battles/Battle.h22
-rw-r--r--battles/include/kurator/battles/Scenario.h22
-rw-r--r--battles/include/kurator/battles/ShipConfig.h23
-rw-r--r--battles/src/Battle.cpp18
5 files changed, 99 insertions, 0 deletions
diff --git a/battles/CMakeLists.txt b/battles/CMakeLists.txt
new file mode 100644
index 0000000..c9b2c19
--- /dev/null
+++ b/battles/CMakeLists.txt
@@ -0,0 +1,14 @@
+project(battles)
+add_library(
+ ${PROJECT_NAME}
+ src/Battle.cpp
+)
+target_include_directories(
+ ${PROJECT_NAME}
+ PUBLIC include
+)
+target_link_libraries(
+ ${PROJECT_NAME}
+ PUBLIC EnTT::EnTT
+ PUBLIC universe
+)
diff --git a/battles/include/kurator/battles/Battle.h b/battles/include/kurator/battles/Battle.h
new file mode 100644
index 0000000..0923f36
--- /dev/null
+++ b/battles/include/kurator/battles/Battle.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <entt/entity/registry.hpp>
+
+#include "Scenario.h"
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+struct Battle
+{
+ explicit Battle(Scenario scenario);
+ entt::registry registry;
+};
+
+
+} // namespace battles
+} // namespace kurator
diff --git a/battles/include/kurator/battles/Scenario.h b/battles/include/kurator/battles/Scenario.h
new file mode 100644
index 0000000..94adf73
--- /dev/null
+++ b/battles/include/kurator/battles/Scenario.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <vector>
+
+#include "ShipConfig.h"
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+struct Scenario
+{
+ using TeamComposition = std::vector<ShipConfig>;
+ std::vector<TeamComposition> teams;
+};
+
+
+} // namespace battles
+} // namespace kurator
diff --git a/battles/include/kurator/battles/ShipConfig.h b/battles/include/kurator/battles/ShipConfig.h
new file mode 100644
index 0000000..f2315fe
--- /dev/null
+++ b/battles/include/kurator/battles/ShipConfig.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <vector>
+
+#include <kurator/universe/ShipType.h>
+#include <kurator/universe/TurretType.h>
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+struct ShipConfig
+{
+ universe::ShipType type;
+ std::vector<universe::TurretType> turrets;
+};
+
+
+} // namespace battles
+} // namespace kurator
diff --git a/battles/src/Battle.cpp b/battles/src/Battle.cpp
new file mode 100644
index 0000000..e185a68
--- /dev/null
+++ b/battles/src/Battle.cpp
@@ -0,0 +1,18 @@
+#include <kurator/battles/Battle.h>
+
+#include <kurator/battles/Scenario.h>
+
+
+namespace kurator
+{
+namespace battles
+{
+
+
+Battle::Battle(Scenario)
+{
+}
+
+
+} // namespace battles
+} // namespace kurator