#include "FragTrap.hpp" #include FragTrap::FragTrap() { std::cout << "FragTrap::FragTrap()" << std::endl; hit_points = 100; energy_points = 100; attack_damage = 30; } FragTrap::FragTrap(const FragTrap &other) { name = other.name; hit_points = other.hit_points; energy_points = other.energy_points; attack_damage = other.attack_damage; std::cout << "FragTrap::FragTrap(const FragTrap &other)" << std::endl; } FragTrap::FragTrap(std::string name) { std::cout << "FragTrap::FragTrap(" << name << ")" << std::endl; hit_points = 100; energy_points = 100; attack_damage = 30; this->name = name; } FragTrap::~FragTrap() { std::cout << "FragTrap::~FragTrap()" << std::endl; } FragTrap &FragTrap::operator=(const FragTrap &other) { this->hit_points = other.hit_points; this->energy_points = other.energy_points; this->attack_damage = other.attack_damage; this->name = other.name; return *this; } void FragTrap::highFivesGuys() { std::cout << "FragTrap " << name << ": High-Five Guys?" << std::endl; }