| 1234567891011121314151617181920212223242526272829303132333435 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* main.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/07/15 16:42:34 by bchanot #+# #+# */
- /* Updated: 2025/07/15 16:43:49 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "HumanA.class.hpp"
- #include "HumanB.class.hpp"
- #include "Weapon.class.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;
- }
|