d03 ex00 ok
This commit is contained in:
39
d03/ex00/ClapTrap.hpp
Normal file
39
d03/ex00/ClapTrap.hpp
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user