cpp/cpp03/ex01/ClapTrap.hpp
2022-08-03 18:24:07 +02:00

44 lines
1.5 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClapTrap.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/13 05:22:53 by apommier #+# #+# */
/* Updated: 2022/08/03 17:23:38 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef CLAPTRAP_HPP
# define CLAPTRAP_HPP
#include <iostream>
class ClapTrap {
public:
ClapTrap(std::string name);
ClapTrap(const ClapTrap& copy);
~ClapTrap();
ClapTrap &operator=(const ClapTrap& rhs);
void attack(const std::string& target);
void takeDamage(unsigned int amount);
void beRepaired(unsigned int amount);
std::string getName(void) const;
int getHitPoints(void) const;
int getEnergyPoints(void) const;
int getAttackDamage(void) const;
protected:
ClapTrap();
std::string _name;
int _hitPoints;
int _energyPoints;
int _attackDamage;
};
#endif