blob: 40b6818e25aaf3a3eee67f1d8477e893f91da935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#pragma once
#include <yacppdic/factory.hpp>
#include <memory>
class IEnemy
{
public:
virtual ~IEnemy() noexcept = default;
virtual int get_health() const noexcept = 0;
virtual void do_damage(int damage) noexcept = 0;
};
using IEnemyFactory = yacppdic::Factory<std::unique_ptr<IEnemy>()>;
|