You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
1.4 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* RobotomyRequestForm.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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;
}