feat(ex01): it works
This commit is contained in:
parent
69e91f7664
commit
6254cbc7bd
7 changed files with 206 additions and 0 deletions
24
ex01/ClapTrap.hpp
Normal file
24
ex01/ClapTrap.hpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue