HumanA.class.cpp 1.2 KB

123456789101112131415161718192021222324252627
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* HumanA.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:13:42 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "HumanA.class.hpp"
  13. #include "Weapon.class.hpp"
  14. #include <iostream>
  15. HumanA::HumanA(std::string name, Weapon &weapon) : _name(name), _weapon(weapon) {
  16. return ;
  17. }
  18. HumanA::~HumanA(void) {
  19. return ;
  20. }
  21. void HumanA::attack(void) const {
  22. std::cout << this->_name << " attacks with their " << this->_weapon.getType() << std::endl;
  23. }