fix(norm): add copy contructor

This commit is contained in:
Khaïs COLIN 2025-05-27 13:39:30 +02:00
parent 7fb5f99a7a
commit 57de4fa948
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
20 changed files with 93 additions and 0 deletions

View file

@ -8,6 +8,14 @@ FragTrap::FragTrap() {
attack_damage = 30;
}
FragTrap::FragTrap(const FragTrap &other) {
name = other.name;
hit_points = other.hit_points;
energy_points = other.energy_points;
attack_damage = other.attack_damage;
std::cout << "FragTrap::FragTrap(const FragTrap &other)" << std::endl;
}
FragTrap::FragTrap(std::string name) {
std::cout << "FragTrap::FragTrap(" << name << ")" << std::endl;
hit_points = 100;