d03 ex00 ok

This commit is contained in:
Hugo LAMY
2022-02-17 13:43:18 +01:00
parent f911e6fbcd
commit 5b836dd5d4
6 changed files with 181 additions and 2 deletions

39
d03/ex00/ClapTrap.hpp Normal file
View File

@@ -0,0 +1,39 @@
#ifndef CLAPTRAP_HPP
# define CLAPTRAP_HPP
#include <iostream>
#include <string>
#include <color.h>
class ClapTrap {
public:
ClapTrap( std::string name ); // default/parametric constructor
ClapTrap( ClapTrap const & src ); // copy constructor
~ClapTrap( void ); // destructor
ClapTrap & operator=( ClapTrap const & rhs ); // assignement operator
void attack(const std::string & target);
void takeDamage(unsigned int amount);
void beRepaired(unsigned int amount);
std::string getName() const;
int getHit() const;
int getEnergy() const;
int getAttack() const;
private:
ClapTrap( void ); // default/parametric constructor
std::string const _name;
int _hit;
int _energy;
int _attack;
};
#endif