36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/09/06 02:18:16 by aortigos #+# #+# */
|
|
/* Updated: 2025/09/07 19:39:06 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "Weapon/Weapon.hpp"
|
|
#include "HumanA/HumanA.hpp"
|
|
#include "HumanB/HumanB.hpp"
|
|
|
|
int main()
|
|
{
|
|
{
|
|
Weapon club = Weapon("crude spiked club");
|
|
HumanA bob("Bob", club);
|
|
bob.attack();
|
|
club.setType("some other type of club");
|
|
bob.attack();
|
|
}
|
|
{
|
|
Weapon club = Weapon("crude spiked club");
|
|
HumanB jim("Jim");
|
|
jim.setWeapon(club);
|
|
jim.attack();
|
|
club.setType("some other type of club");
|
|
jim.attack();
|
|
}
|
|
return 0;
|
|
}
|