mirror of
https://github.com/Ladebeze66/cpp-partie-1.git
synced 2025-12-15 21:57:03 +01:00
28 lines
1.2 KiB
C++
28 lines
1.2 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* HumanB.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/12/24 17:48:26 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/12/24 17:54:54 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "HumanB.hpp"
|
|
|
|
HumanB::HumanB(std::string name) : _name(name) {}
|
|
|
|
void HumanB::attack(void)
|
|
{
|
|
const std::string type = this->_weapon->getType();
|
|
std::cout << this->_name << " attacks with their " << type << std::endl;
|
|
}
|
|
|
|
void HumanB::setWeapon(Weapon &weapon)
|
|
{
|
|
this->_weapon = &weapon;
|
|
}
|
|
|
|
HumanB::~HumanB(void) {} |