debut d01 ex03

This commit is contained in:
hugogogo
2022-02-05 19:14:56 +01:00
parent e6929e8e12
commit c1990815e2
11 changed files with 306 additions and 0 deletions

21
d01/ex03/HumanB.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "HumanB.hpp"
HumanB::HumanB( std::string name ) {
this->_name = name;
}
HumanB::~HumanB() {}
void setWeapon( Weapon weapon ) {
this->_weapon = &weapon;
}
void HumanB::attack( void ) {
std::cout << this->_name << " attacks with their " << this->_weapon->getType() << std::endl;
}