blob: 231b7f47ddf408c1c6aa12ab77020faee372c3c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include "interfaces/enemy.hpp"
#include "interfaces/enemy_creator.hpp"
#include <yacppdic/auto_wirable.hpp>
#include <yacppdic/tagged.hpp>
class EnemyCreator : public IEnemyCreator,
public yacppdic::AutoWirable<
IEnemyCreator,
EnemyCreator,
yacppdic::Tagged<IEnemyFactory, SMALL_ENEMY_TAG>,
yacppdic::Tagged<IEnemyFactory, BIG_ENEMY_TAG>>
{
public:
EnemyCreator(
IEnemyFactory small_enemy_factory,
IEnemyFactory big_enemy_factory
) noexcept;
auto create_small_enemy() noexcept -> std::unique_ptr<IEnemy> override;
auto create_big_enemy() noexcept -> std::unique_ptr<IEnemy> override;
private:
IEnemyFactory _small_enemy_factory;
IEnemyFactory _big_enemy_factory;
};
|