diff options
Diffstat (limited to 'cpp01/ex06/HumanB.cpp')
| -rw-r--r-- | cpp01/ex06/HumanB.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp01/ex06/HumanB.cpp b/cpp01/ex06/HumanB.cpp new file mode 100644 index 0000000..e08363c --- /dev/null +++ b/cpp01/ex06/HumanB.cpp @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* HumanB.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/02 16:46:02 by cacharle #+# #+# */ +/* Updated: 2020/02/02 16:54:33 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "HumanB.hpp" + +HumanB::HumanB(std::string name) +{ + this->name = name; +} + +void HumanB::attack() +{ + std::cout << name << " attack with his " << weapon.getType(); +} + +void HumanB::setWeapon(Weapon weapon) +{ + this->weapon = weapon; +} |
