1
0
This repository has been archived on 2024-11-25. You can view files and clone it, but cannot push or open issues or pull requests.
CPP_Module_01/ex03/HumanB.cpp

25 lines
1.2 KiB
C++
Raw Normal View History

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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) { }