From 1d593b80d53124b96c2fcee1106b6fff88a2375b Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Mon, 10 Feb 2025 11:34:52 +0100 Subject: [PATCH] Add zombieHorde func --- ex01/Zombie.cpp | 10 +++++++++- ex01/Zombie.hpp | 4 +++- ex01/main.cpp | 13 +++++++++++-- ex01/zombieHorde.cpp | 11 +++++++++-- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/ex01/Zombie.cpp b/ex01/Zombie.cpp index bbd0a65..92d3a5f 100644 --- a/ex01/Zombie.cpp +++ b/ex01/Zombie.cpp @@ -6,13 +6,16 @@ /* By: dkaiser +Zombie::Zombie(void) +{} + Zombie::Zombie(const std::string &name) :name(name) {} @@ -26,3 +29,8 @@ void Zombie::announce(void) { std::cout << name << ": BraiiiiiiinnnzzzZ..." << std::endl; } + +void Zombie::setName(const std::string &name) +{ + this->name = name; +} diff --git a/ex01/Zombie.hpp b/ex01/Zombie.hpp index 5c96e80..8f539d2 100644 --- a/ex01/Zombie.hpp +++ b/ex01/Zombie.hpp @@ -6,7 +6,7 @@ /* By: dkaiser