Min fixes v2.0

This commit is contained in:
Angel Ortigosa Perez
2025-10-26 20:32:36 +01:00
parent 46b7b99abb
commit c9e9e69c06
3 changed files with 21 additions and 8 deletions

View File

@@ -6,12 +6,13 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/12 13:17:34 by aortigos #+# #+# */
/* Updated: 2025/09/19 12:34:26 by aortigos ### ########.fr */
/* Updated: 2025/10/26 20:25:35 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "ClapTrap/ClapTrap.hpp"
#include "ScavTrap/ScavTrap.hpp"
#include "FragTrap/FragTrap.hpp"
int main()
{
@@ -29,11 +30,13 @@ int main()
b.beRepaired(10);
b.guardGate();
std::cout << "\n--- Copy and Assignment Test ---" << std::endl;
ScavTrap c = b; // copy constructor
ScavTrap d;
d = b; // assignment operator
d.attack("another enemy");
std::cout << "\n--- Testing FragTrap ---" << std::endl;
FragTrap c("Bob");
c.attack("enemy");
c.takeDamage(20);
c.beRepaired(10);
c.highFivesGuys();
return 0;
}