82 if (hitPoints > 0 && energyPoints > 0) {
83 std::cout <<
"FragTrap " << name <<
" attacks " << target <<
", causing " << attackDamage
86 }
else if (hitPoints == 0) {
87 std::cout <<
"FragTrap " << name <<
" is out of hit points and cannot attack!" <<
std::endl;
89 std::cout <<
"FragTrap " << name <<
" is out of energy points and cannot attack!" <<
std::endl;
Represents a basic robot character.
ClapTrap & operator=(const ClapTrap &other)
Copy assignment operator implementation.
Represents a FragTrap robot, a specialized type derived from ClapTrap.
void highFivesGuys(void)
highFivesGuys function implementation for FragTrap.
FragTrap()
Default constructor implementation for FragTrap.
virtual void attack(const std::string &target)
Attack function implementation for FragTrap.
FragTrap & operator=(const FragTrap &other)
virtual ~FragTrap()
Virtual destructor implementation for FragTrap.
Header file for the FragTrap class, a derived class of ClapTrap.