diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-06 18:23:42 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-06 18:23:55 +0200 |
commit | 3957dfb9361e864f6362e59655c885f52b39371f (patch) | |
tree | 5ef55a5eb418664b4a5c0d2d9328ff4ca99a74a7 /examples/basic/src/enemy_creator.cpp | |
parent | d8ea3721d83254e91c5617d83f2aac5a897107fb (diff) |
docs: add tagging to basic examplev0.1.3
Diffstat (limited to 'examples/basic/src/enemy_creator.cpp')
-rw-r--r-- | examples/basic/src/enemy_creator.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/basic/src/enemy_creator.cpp b/examples/basic/src/enemy_creator.cpp new file mode 100644 index 0000000..820ce1b --- /dev/null +++ b/examples/basic/src/enemy_creator.cpp @@ -0,0 +1,19 @@ +#include "enemy_creator.hpp" + +EnemyCreator::EnemyCreator( + IEnemyFactory small_enemy_factory, + IEnemyFactory big_enemy_factory +) noexcept + : _small_enemy_factory(small_enemy_factory), _big_enemy_factory(big_enemy_factory) +{ +} + +std::unique_ptr<IEnemy> EnemyCreator::create_small_enemy() noexcept +{ + return _small_enemy_factory(); +} + +std::unique_ptr<IEnemy> EnemyCreator::create_big_enemy() noexcept +{ + return _big_enemy_factory(); +} |