aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/src/hero.cpp
blob: 7348982c0790bc62d334bc00403c38cd3fc0ce24 (plain)
1
2
3
4
5
6
7
8
9
10
#include "hero.hpp"

#include <utility>

Hero::Hero(std::shared_ptr<IWeapon> weapon) noexcept : _weapon(std::move(weapon)) {}

void Hero::fight(IEnemy &enemy) noexcept
{
	enemy.do_damage(_weapon->get_strength());
}