mirror of
https://github.com/Ladebeze66/cpp-partie-1.git
synced 2025-12-15 21:57:03 +01:00
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/12/24 15:58:41 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/12/24 18:05:04 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#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);
|
|
}
|