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 "FragTrap.hpp"
|
||||
#include <iostream>
|
||||
|
||||
const unsigned int FragTrap::default_hit_points(100);
|
||||
const unsigned int FragTrap::default_energy_points(100);
|
||||
const unsigned int FragTrap::default_attack_damage(30);
|
||||
|
||||
FragTrap::FragTrap() {
|
||||
std::cout << "FragTrap::FragTrap()" << std::endl;
|
||||
hit_points = 100;
|
||||
energy_points = 100;
|
||||
attack_damage = 30;
|
||||
hit_points = FragTrap::default_hit_points;
|
||||
energy_points = FragTrap::default_energy_points;
|
||||
attack_damage = FragTrap::default_attack_damage;
|
||||
}
|
||||
|
||||
FragTrap::FragTrap(const FragTrap &other) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue