/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* FragTrap.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: aortigos health = 100; this->energy = 100; this->attackDamage = 30; std::cout << "FragTrap default constructor called " << this->name << std::endl; } FragTrap::FragTrap(std::string name) : ClapTrap(name) { this->health = 100; this->energy = 100; this->attackDamage = 30; std::cout << "FragTrap constructor called " << this->name << std::endl; } FragTrap::FragTrap(const FragTrap &other) : ClapTrap(other) { } FragTrap& FragTrap::operator=(const FragTrap &other) { if (this != &other) { this->name = other.name; this->health = other.health; this->energy = other.energy; this->attackDamage = other.attackDamage; } return (*this); } FragTrap::~FragTrap() { std::cout << "FragTrap destructor called for " << this->name << std::endl; } void FragTrap::highFivesGuys(void) { std::cout << "FragTrap " << this->name << " has requested a high-five!" << std::endl; }