Min fixes v2.0

This commit is contained in:
Angel Ortigosa Perez
2025-10-26 20:32:36 +01:00
parent 46b7b99abb
commit c9e9e69c06
3 changed files with 21 additions and 8 deletions

View File

@@ -30,7 +30,17 @@ ScavTrap::ScavTrap(std::string name) : ClapTrap(name)
<< std::endl;
}
ScavTrap::ScavTrap(const ScavTrap &other) : ClapTrap(other) { }
ScavTrap::ScavTrap(const ScavTrap &other) : ClapTrap(other)
{
this->name = other.name;
this->health = other.health;
this->energy = other.energy;
this->attackDamage = other.attackDamage;
std::cout << "ScavTrap copy constructor called for " << this->name << std::endl;
}
ScavTrap& ScavTrap::operator=(const ScavTrap &other)
{