d03 ex01 refonte complete ok

This commit is contained in:
Hugo LAMY
2022-02-22 18:49:15 +01:00
parent bb6c0515b1
commit 088a54d036
9 changed files with 87 additions and 125 deletions

View File

@@ -13,7 +13,7 @@ ScavTrap::ScavTrap( std::string name ) : ClapTrap(name) {
return;
}
ScavTrap::ScavTrap( ScavTrap const & src ) : ClapTrap() {
ScavTrap::ScavTrap( ScavTrap const & src ) {
_class = _dClass;
*this = src;
_number = getTotalNumber();
@@ -35,20 +35,8 @@ ScavTrap::~ScavTrap( void ) {
*********************************************/
ScavTrap & ScavTrap::operator=( ScavTrap const & rhs ) {
if ( this != &rhs )
{
ClapTrap::operator=(rhs);
// _name = rhs.getName();
// _hit = rhs.getHit();
// _energy = rhs.getEnergy();
// _attack = rhs.getAttack();
// _name = rhs.getName();
}
std::cout << _class << "T " << _name << "-" << _number << " assigned\n";
ClapTrap::operator=(rhs);
return *this;
}
/*********************************************