aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic/src/interfaces')
-rw-r--r--examples/basic/src/interfaces/enemy.hpp3
-rw-r--r--examples/basic/src/interfaces/enemy_creator.hpp15
2 files changed, 18 insertions, 0 deletions
diff --git a/examples/basic/src/interfaces/enemy.hpp b/examples/basic/src/interfaces/enemy.hpp
index 40b6818..5f49ca6 100644
--- a/examples/basic/src/interfaces/enemy.hpp
+++ b/examples/basic/src/interfaces/enemy.hpp
@@ -4,6 +4,9 @@
#include <memory>
+constexpr char SMALL_ENEMY_TAG[] = "small";
+constexpr char BIG_ENEMY_TAG[] = "big";
+
class IEnemy
{
public:
diff --git a/examples/basic/src/interfaces/enemy_creator.hpp b/examples/basic/src/interfaces/enemy_creator.hpp
new file mode 100644
index 0000000..820b636
--- /dev/null
+++ b/examples/basic/src/interfaces/enemy_creator.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "interfaces/enemy.hpp"
+
+#include <memory>
+
+class IEnemyCreator
+{
+public:
+ virtual ~IEnemyCreator() = default;
+
+ virtual std::unique_ptr<IEnemy> create_small_enemy() noexcept = 0;
+
+ virtual std::unique_ptr<IEnemy> create_big_enemy() noexcept = 0;
+};