ClapTrap.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ClapTrap.hpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/12/18 13:30:30 by bchanot #+# #+# */
  9. /* Updated: 2025/12/18 13:52:24 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #ifndef CLAPTRAP_HPP
  13. # define CLAPTRAP_HPP
  14. # include <iostream>
  15. # include <string>
  16. class ClapTrap
  17. {
  18. public:
  19. ClapTrap();
  20. ClapTrap( std::string const & name );
  21. ClapTrap( ClapTrap const & src );
  22. ~ClapTrap();
  23. ClapTrap & operator=( ClapTrap const & rhs );
  24. void attack(const std::string & target);
  25. void takeDamage(unsigned int amount);
  26. void beRepaired(unsigned int amount);
  27. private:
  28. std::string const _name;
  29. u_int16_t _hitPoints;
  30. u_int16_t _energyPoints;
  31. u_int16_t _attackDamage;
  32. };
  33. std::ostream & operator<<( std::ostream & o, ClapTrap const & i );
  34. #endif /* ******************************************************** CLAPTRAP_H */