blob: fad3f7898752e93e72a6746c07f75e1e87874995 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* HumanB.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/10 12:00:11 by dkaiser #+# #+# */
/* Updated: 2025/02/10 12:59:59 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
#include "HumanB.hpp"
#include <iostream>
HumanB::HumanB(const std::string &name)
:name(name)
{}
void HumanB::attack(void) const
{
std::cout << name << " attacks with their ";
std::cout << weapon->getType() << std::endl;
}
void HumanB::setWeapon(Weapon &weapon)
{
this->weapon = &weapon;
}
|