aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/hero.hpp
blob: e4959d21572bd45a9b1a7f83bcf12e9d5ba6b891 (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:
	Hero(std::shared_ptr<IWeapon> weapon) noexcept;

	void fight(IEnemy &enemy) noexcept override;

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