78 this->name = other.name;
109 std::cout <<
"DiamondTrap name: " << name <<
", ClapTrap name: " << ClapTrap::name <<
std::endl;
Header file for the DiamondTrap class, inheriting from FragTrap and ScavTrap.
Represents a basic robot character.
ClapTrap & operator=(const ClapTrap &other)
Copy assignment operator implementation.
Represents a DiamondTrap robot, inheriting from both FragTrap and ScavTrap.
void attack(const std::string &target)
Attack function implementation for DiamondTrap, using ScavTrap's attack.
DiamondTrap()
Default constructor implementation for DiamondTrap.
virtual const std::string & getName() const
Gets the DiamondTrap's private name.
virtual ~DiamondTrap()
Virtual destructor implementation for DiamondTrap.
static const unsigned int defaultAttackDamage
DiamondTrap & operator=(const DiamondTrap &other)
Copy assignment operator implementation for DiamondTrap.
static const unsigned int defaultHitPoints
void whoAmI()
whoAmI function implementation for DiamondTrap.
const std::string & getClapTrapName() const
Gets the ClapTrap's name associated with the DiamondTrap.
static const unsigned int defaultEnergyPoints
Represents a FragTrap robot, a specialized type derived from ClapTrap.
Represents a ScavTrap robot, a specialized type derived from ClapTrap.
virtual void attack(const std::string &target)
Attack function implementation for ScavTrap.