diff options
Diffstat (limited to 'examples/basic/src/hero.hpp')
-rw-r--r-- | examples/basic/src/hero.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/basic/src/hero.hpp b/examples/basic/src/hero.hpp new file mode 100644 index 0000000..e4959d2 --- /dev/null +++ b/examples/basic/src/hero.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "interfaces/hero.hpp" +#include "interfaces/weapon.hpp" + +#include <yacppdic/auto_wirable.hpp> + +#include <memory> + +class Hero : public IHero, public yacppdic::AutoWirable<IHero, Hero, IWeapon> +{ +public: + Hero(std::shared_ptr<IWeapon> weapon) noexcept; + + void fight(IEnemy &enemy) noexcept override; + +private: + std::shared_ptr<IWeapon> _weapon; +}; |