diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-13 10:33:05 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-13 10:33:05 +0200 |
| commit | 0f3240844dbd5a874e1565a988ef355ededab6a5 (patch) | |
| tree | efc1a1307863d173be17a12fbab6b84fe7d00960 /cpp01/ex02/ZombieEvent.cpp | |
| parent | 629d52b1262879a346e9ca17567a8f483c60ba0a (diff) | |
| download | piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.gz piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.bz2 piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.zip | |
Fixing cpp01
Diffstat (limited to 'cpp01/ex02/ZombieEvent.cpp')
| -rw-r--r-- | cpp01/ex02/ZombieEvent.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/cpp01/ex02/ZombieEvent.cpp b/cpp01/ex02/ZombieEvent.cpp index 6775138..acb8dd0 100644 --- a/cpp01/ex02/ZombieEvent.cpp +++ b/cpp01/ex02/ZombieEvent.cpp @@ -1,17 +1,28 @@ -#include <cstdlib> +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ZombieEvent.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/13 09:41:33 by charles #+# #+# */ +/* Updated: 2020/04/13 09:49:36 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "ZombieEvent.hpp" -void ZombieEvent::setZombieType(std::string type) +void ZombieEvent::setZombieType(std::string storedType) { - stored_type = type; + m_storedType = storedType; } -Zombie *ZombieEvent::newZombie(std::string name) +Zombie* ZombieEvent::newZombie(std::string name) { - return new Zombie(name, stored_type); + return new Zombie(name, m_storedType); } -Zombie *ZombieEvent::randomChump() +Zombie* ZombieEvent::randomChump() { std::string pool[10] = { "Jordan", @@ -25,5 +36,5 @@ Zombie *ZombieEvent::randomChump() "yo", "rideaux" }; - return new Zombie(pool[rand() % 10], stored_type); + return new Zombie(pool[rand() % 10], m_storedType); } |
