HumanB.class.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* HumanB.class.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/07/15 15:54:21 by bchanot #+# #+# */
  9. /* Updated: 2025/07/15 18:12:20 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "HumanB.class.hpp"
  13. #include <iostream>
  14. HumanB::HumanB(std::string name) : _name(name) {
  15. return ;
  16. }
  17. HumanB::~HumanB(void) {
  18. return ;
  19. }
  20. void HumanB::attack(void) const {
  21. std::cout << this->_name << " attacks with their " << this->_weapon->getType() << std::endl;
  22. }
  23. void HumanB::setWeapon(Weapon &weapon) {
  24. this->_weapon = &weapon;
  25. return;
  26. }