29 lines
531 B
C++
29 lines
531 B
C++
#ifndef CLAPTRAP_HPP
|
|
# define CLAPTRAP_HPP
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
class ClapTrap {
|
|
|
|
protected:
|
|
std::string _name;
|
|
unsigned int _hit_pts;
|
|
unsigned int _energy_pts;
|
|
unsigned int _attack_dmg;
|
|
|
|
public:
|
|
ClapTrap();
|
|
ClapTrap(const ClapTrap ©);
|
|
ClapTrap(std::string name);
|
|
|
|
virtual ~ClapTrap();
|
|
|
|
ClapTrap &operator=(const ClapTrap &src);
|
|
|
|
void attack(const std::string &target);
|
|
void takeDamage(unsigned int amount);
|
|
void beRepaired(unsigned int amount);
|
|
};
|
|
|
|
#endif |