blob: 820ce1b55ba3654607540a9e5480dea348e8ebd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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();
}
|