| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ClapTrap.hpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/12/18 13:30:30 by bchanot #+# #+# */
- /* Updated: 2025/12/18 15:13:51 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #ifndef CLAPTRAP_HPP
- # define CLAPTRAP_HPP
- # include <iostream>
- # include <string>
- class ClapTrap
- {
- public:
- ClapTrap();
- ClapTrap( std::string const & name );
- ClapTrap( ClapTrap const & src );
- ~ClapTrap();
- ClapTrap & operator=( ClapTrap const & rhs );
- void attack(const std::string & target);
- void takeDamage(unsigned int amount);
- void beRepaired(unsigned int amount);
- protected:
- std::string _name;
- u_int16_t _hitPoints;
- u_int16_t _energyPoints;
- u_int16_t _attackDamage;
- };
- std::ostream & operator<<( std::ostream & o, ClapTrap const & i );
- #endif /* ******************************************************** CLAPTRAP_H */
|