fix(norm): add copy contructor
This commit is contained in:
parent
7fb5f99a7a
commit
57de4fa948
20 changed files with 93 additions and 0 deletions
|
|
@ -8,6 +8,14 @@ ScavTrap::ScavTrap() {
|
|||
attack_damage = 20;
|
||||
}
|
||||
|
||||
ScavTrap::ScavTrap(const ScavTrap &other) {
|
||||
name = other.name;
|
||||
hit_points = other.hit_points;
|
||||
energy_points = other.energy_points;
|
||||
attack_damage = other.attack_damage;
|
||||
std::cout << "ScavTrap::ScavTrap(const ScavTrap &other)" << std::endl;
|
||||
}
|
||||
|
||||
ScavTrap::ScavTrap(std::string name) {
|
||||
std::cout << "ScavTrap::ScavTrap(" << name << ")" << std::endl;
|
||||
hit_points = 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue