2025-05-20 11:24:16 +02:00
|
|
|
#ifndef CLAPTRAP_HPP
|
|
|
|
|
#define CLAPTRAP_HPP
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
class ClapTrap {
|
|
|
|
|
protected:
|
|
|
|
|
std::string name;
|
|
|
|
|
unsigned int hit_points;
|
|
|
|
|
unsigned int energy_points;
|
|
|
|
|
unsigned int attack_damage;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ClapTrap();
|
2025-05-27 13:39:30 +02:00
|
|
|
ClapTrap(const ClapTrap &other);
|
2025-05-20 11:24:16 +02:00
|
|
|
ClapTrap(std::string name);
|
|
|
|
|
~ClapTrap();
|
|
|
|
|
ClapTrap &operator=(const ClapTrap &other);
|
|
|
|
|
|
|
|
|
|
void attack(const std::string &target);
|
|
|
|
|
void takeDamage(unsigned int amount);
|
|
|
|
|
void beRepaired(unsigned int amount);
|
|
|
|
|
|
|
|
|
|
unsigned int get_hit_points() const;
|
|
|
|
|
unsigned int get_energy_points() const;
|
|
|
|
|
unsigned int get_attack_damage() const;
|
|
|
|
|
|
|
|
|
|
void showStats() const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|