Files
42_INT_09_piscine_cpp/d01/ex03/HumanB.cpp
2022-03-15 21:11:15 +01:00

19 lines
347 B
C++

#include "HumanB.hpp"
HumanB::HumanB( std::string name ) {
this->_name = name;
}
HumanB::~HumanB() {}
void HumanB::setWeapon( Weapon &weapon ) {
this->_weapon = &weapon;
}
void HumanB::attack( void ) {
if (!this->_weapon)
return;
std::cout << this->_name << " attacks with their ";
std::cout << this->_weapon->getType() << std::endl;
}