d04 correction deux erreurs

This commit is contained in:
Hugo LAMY
2022-03-15 21:11:15 +01:00
parent 66c68016ab
commit c19c89be85
10 changed files with 126 additions and 20 deletions

View File

@@ -1,22 +1,18 @@
#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;
}