style: using the canonical form

This commit is contained in:
Raphael 2025-02-10 10:59:48 +01:00
parent d59e35466b
commit a909970d76
18 changed files with 201 additions and 37 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/10 13:59:49 by rparodi #+# #+# */
/* Updated: 2025/01/24 18:32:35 by rparodi ### ########.fr */
/* Updated: 2025/02/10 10:55:30 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,7 +15,12 @@
#include <iostream>
ClapTrap::ClapTrap() {
_name = "";
_hit_point = 0;
_energy_point = 0;
_attack_damage = 0;
std::cout << "\n[Init] ClapTrap (no_name)" << std::endl;
}
ClapTrap::ClapTrap(std::string name) {
@ -26,6 +31,14 @@ ClapTrap::ClapTrap(std::string name) {
std::cout << "\n[Init] ClapTrap:\n\t" << "Name: " << _name << std::endl;
}
ClapTrap::ClapTrap(ClapTrap const &copy) {
_name = copy._name;
_hit_point = copy._hit_point;
_energy_point = copy._energy_point;
_attack_damage = copy._attack_damage;
std::cout << "\n[Init] ClapTrap (copy):\n\t" << "Name: " << _name << std::endl;
}
ClapTrap::~ClapTrap() {
std::cout << "\n[Delete] ClapTrap:\n\t" << "Name: " << _name << std::endl;
}