🎉」 init: hello world !

This commit is contained in:
2025-08-02 13:51:40 +02:00
commit 224ed0cf99
44 changed files with 2108 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
#include "RobotomyRequestForm.hpp"
#include "Bureaucrat.hpp"
#include <cstdlib>
RobotomyRequestForm::RobotomyRequestForm(void): AForm("RobotomyRequestForm", 72, 45) {
_log("", "RobotomyRequestForm", "", "default constructor called");
std::srand(time(0));
}
RobotomyRequestForm::RobotomyRequestForm(const RobotomyRequestForm &cpy) : AForm(cpy) {
_log("", "RobotomyRequestForm", "", "copy constructor called");
std::srand(time(0));
if (this != &cpy)
*this = cpy;
}
RobotomyRequestForm::RobotomyRequestForm(std::string target): AForm(target, 72, 45) {
_log("", "RobotomyRequestForm", "", "target constructor called");
std::srand(time(0));
}
RobotomyRequestForm::~RobotomyRequestForm(void) {
_log("", "RobotomyRequestForm", "", "destructor called");
}
RobotomyRequestForm &RobotomyRequestForm::operator=(const RobotomyRequestForm &cpy) {
_log("", "RobotomyRequestForm", "", "copy assignement constructor called");
(void) cpy;
return *this;
}
void RobotomyRequestForm::_exec(const Bureaucrat &b) const {
(void) b;
std::cout << "Driling noise or smth idk" << std::endl;
if (std::rand() % 2) {
std::cout << this->getName() << " has been robotomised successfully ! :D" << std::endl;
} else {
std::cout << this->getName() << " robotomisation failed D:" << std::endl;
}
}