From 21a47da9b52513b36da98025af21898b259e6a0d Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 9 Aug 2023 14:07:18 +0000 Subject: [PATCH] fixed --- ex00/src/ClapTrap.cpp | 10 +++++----- ex01/src/ClapTrap.cpp | 10 +++++----- ex02/src/ClapTrap.cpp | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ex00/src/ClapTrap.cpp b/ex00/src/ClapTrap.cpp index feab9e2..3f67e71 100644 --- a/ex00/src/ClapTrap.cpp +++ b/ex00/src/ClapTrap.cpp @@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life += amount; this->_energy--; - std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; + std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; } void ClapTrap::takeDamage(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life -= amount; @@ -68,9 +68,9 @@ void ClapTrap::attack(const std::string &target) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_energy--; - std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl; + std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl; } diff --git a/ex01/src/ClapTrap.cpp b/ex01/src/ClapTrap.cpp index f30fc2d..a016083 100644 --- a/ex01/src/ClapTrap.cpp +++ b/ex01/src/ClapTrap.cpp @@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life += amount; this->_energy--; - std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; + std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; } void ClapTrap::takeDamage(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life -= amount; @@ -68,11 +68,11 @@ void ClapTrap::attack(const std::string &target) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_energy--; - std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl; + std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl; } const std::string& ClapTrap::getName() const diff --git a/ex02/src/ClapTrap.cpp b/ex02/src/ClapTrap.cpp index f30fc2d..a016083 100644 --- a/ex02/src/ClapTrap.cpp +++ b/ex02/src/ClapTrap.cpp @@ -45,19 +45,19 @@ void ClapTrap::beRepaired(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life += amount; this->_energy--; - std::cerr << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; + std::cout << "ClapTrap " << this->_name << " beRepaired causing life is now " << this->_life << std::endl; } void ClapTrap::takeDamage(unsigned int amount) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_life -= amount; @@ -68,11 +68,11 @@ void ClapTrap::attack(const std::string &target) { if (this->_life == 0 || this->_energy == 0) { - std::cerr << "error: ClapTrap " << this->_name << " dead" << std::endl; + std::cout << "error: ClapTrap " << this->_name << " dead" << std::endl; return; } this->_energy--; - std::cerr << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage" << std::endl; + std::cout << "ClapTrap " << this->_name << " attacks " << target << ", causing " << this->_damage << " points of damage!" << std::endl; } const std::string& ClapTrap::getName() const