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,12 +6,30 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/24 17:41:01 by rparodi #+# #+# */
/* Updated: 2025/01/24 20:31:45 by rparodi ### ########.fr */
/* Updated: 2025/02/10 10:56:14 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "ScavTrap.hpp"
ScavTrap::ScavTrap() {
_name = "";
_hit_point = 0;
_energy_point = 0;
_attack_damage = 0;
_gateKeeperMode = false;
std::cout << "\n[Init] ScavTrap (no_name)" << std::endl;
}
ScavTrap::ScavTrap(ScavTrap const &copy) {
_name = copy._name;
_hit_point = copy._hit_point;
_energy_point = copy._energy_point;
_attack_damage = copy._attack_damage;
_gateKeeperMode = copy._gateKeeperMode;
std::cout << "\n[Init] ScavTrap (copy):\n\t" << "Name: " << _name << std::endl;
}
ScavTrap::ScavTrap (std::string name) {
_name = name;
_hit_point = 100;
@ -21,7 +39,11 @@ ScavTrap::ScavTrap (std::string name) {
std::cout << "\n[Init] ScavTrap:\n\t" << "Name: " << _name << std::endl;
}
ScavTrap::~ScavTrap() {
}
void ScavTrap::guardGate() {
_gateKeeperMode = !_gateKeeperMode;
_gateKeeperMode = !_gateKeeperMode;
std::cout << "\n[Mode] ScavTrap:\n\t" << "Name: " << _name << " the mode gate keeper is now: " << (_gateKeeperMode ? "enable" : "disable") << std::endl;
}