aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/hero.hpp
blob: e3108175bd42f682b7810a4d38b4742f66c6204f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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:
	explicit Hero(std::shared_ptr<IWeapon> weapon) noexcept;

	void fight(IEnemy &enemy) noexcept override;

private:
	std::shared_ptr<IWeapon> _weapon;
};