36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/11/04 19:20:57 by adjoly #+# #+# */
|
|
/* Updated: 2024/11/05 17:43:17 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "HumanA.hpp"
|
|
#include "HumanB.hpp"
|
|
#include <iostream>
|
|
|
|
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;
|
|
}
|