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.5 KiB
39 lines
1.5 KiB
3 years ago
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* 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) {
|
||
|
|
||
|
cout << "RobotomyRequestForm parameter constructor called" << endl;
|
||
|
}
|
||
|
|
||
|
RobotomyRequestForm::~RobotomyRequestForm (void) {
|
||
|
|
||
|
cout << "RobotomyRequestForm default destructor called" << endl;
|
||
|
}
|
||
|
|
||
|
void RobotomyRequestForm::run(void) const {
|
||
|
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;
|
||
|
}
|