25 lines
1.2 KiB
C++
25 lines
1.2 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* HumanB.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/11/04 19:43:18 by adjoly #+# #+# */
|
|
/* Updated: 2024/11/09 18:48:06 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "HumanB.hpp"
|
|
#include <iostream>
|
|
|
|
void HumanB::attack(void) {
|
|
std::cout << this->_name << " attacks with their " << this->_weapon->getType() << std::endl;
|
|
}
|
|
|
|
void HumanB::setWeapon(Weapon &newWeapon) {
|
|
this->_weapon = &newWeapon;
|
|
}
|
|
|
|
HumanB::HumanB(std::string name) : _name(name), _weapon(NULL) { }
|