/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: apommier +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/10 20:12:10 by apommier #+# #+# */ /* Updated: 2022/07/23 12:42:17 by apommier ### ########.fr */ /* */ /* ************************************************************************** */ #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(); } { Weapon club = Weapon("crude spiked club"); HumanB jim("Jim"); jim.setWeapon(club); HumanB john(jim); john.attack(); club.setType("some other type of club"); john.attack(); } return (0); }