cpp01...
This commit is contained in:
37
ex03/main.cpp
Normal file
37
ex03/main.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/06 02:18:16 by aortigos #+# #+# */
|
||||
/* Updated: 2025/09/06 14:29:53 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.attack();
|
||||
jim.setWeapon(club);
|
||||
|
||||
jim.attack();
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
Reference in New Issue
Block a user