diff options
Diffstat (limited to 'ex03/HumanB.cpp')
| -rw-r--r-- | ex03/HumanB.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ex03/HumanB.cpp b/ex03/HumanB.cpp index 4550c59..fad3f78 100644 --- a/ex03/HumanB.cpp +++ b/ex03/HumanB.cpp @@ -6,7 +6,24 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/10 12:00:11 by dkaiser #+# #+# */ -/* Updated: 2025/02/10 12:01:05 by dkaiser ### ########.fr */ +/* Updated: 2025/02/10 12:59:59 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ +#include "HumanB.hpp" +#include <iostream> + +HumanB::HumanB(const std::string &name) + :name(name) +{} + +void HumanB::attack(void) const +{ + std::cout << name << " attacks with their "; + std::cout << weapon->getType() << std::endl; +} + +void HumanB::setWeapon(Weapon &weapon) +{ + this->weapon = &weapon; +} |
