feat(ex01): it works

This commit is contained in:
Khaïs COLIN 2025-05-19 14:13:59 +02:00
parent 69e91f7664
commit 6254cbc7bd
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
7 changed files with 206 additions and 0 deletions

24
ex01/ClapTrap.hpp Normal file
View file

@ -0,0 +1,24 @@
#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();
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);
};
#endif