fix(ex03): never construct more than one ClapTrap when constructing DiamondTrap
This commit is contained in:
parent
812791dc77
commit
a843186f5e
5 changed files with 33 additions and 18 deletions
|
|
@ -1,11 +1,15 @@
|
|||
#include "ScavTrap.hpp"
|
||||
#include <iostream>
|
||||
|
||||
const unsigned int ScavTrap::default_hit_points(100);
|
||||
const unsigned int ScavTrap::default_energy_points(50);
|
||||
const unsigned int ScavTrap::default_attack_damage(20);
|
||||
|
||||
ScavTrap::ScavTrap() {
|
||||
std::cout << "ScavTrap::ScavTrap()" << std::endl;
|
||||
hit_points = 100;
|
||||
energy_points = 50;
|
||||
attack_damage = 20;
|
||||
hit_points = ScavTrap::default_hit_points;
|
||||
energy_points = ScavTrap::default_energy_points;
|
||||
attack_damage = ScavTrap::default_attack_damage;
|
||||
}
|
||||
|
||||
ScavTrap::ScavTrap(const ScavTrap &other) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue