38 lines
1.4 KiB
C++
38 lines
1.4 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* Main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: lfirmin <lfirmin@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/07/01 16:53:34 by lfirmin #+# #+# */
|
|
/* Updated: 2025/07/01 16:53:45 by lfirmin ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include "Weapon.hpp"
|
|
#include "HumanA.hpp"
|
|
#include "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;
|
|
}
|