debut d01 ex03
This commit is contained in:
21
d01/ex03/HumanB.cpp
Normal file
21
d01/ex03/HumanB.cpp
Normal 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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user