/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RobotomyRequestForm.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/27 10:17:52 by narnaud #+# #+# */ /* Updated: 2022/06/27 14:43:34 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "RobotomyRequestForm.hpp" RobotomyRequestForm::RobotomyRequestForm(const string target) : Form("RobotomyRequestForm", 72, 45, target) {} RobotomyRequestForm::~RobotomyRequestForm(void) {} void RobotomyRequestForm::run(void) const { srand(time(NULL)); int r = rand(); cout << "ratatttaatata" << endl; sleep(1); cout << "ratata tatata" << endl; sleep(1); cout << "ratata" << endl; sleep(1); if (r % 2) cout << _target << " have been robotomized" << endl; else cout << _target << " robotomization failed" << endl; }