diff --git a/ex02/ShrubberyCreationForm/ShrubberyCreationForm.cpp b/ex02/ShrubberyCreationForm/ShrubberyCreationForm.cpp index 06d384d..fb9f11a 100644 --- a/ex02/ShrubberyCreationForm/ShrubberyCreationForm.cpp +++ b/ex02/ShrubberyCreationForm/ShrubberyCreationForm.cpp @@ -73,7 +73,21 @@ void ShrubberyCreationForm::execute(Bureaucrat const &executor) throw FormNotSignedException(); if (this->getGradeToExecute() < executor.getGrade()) throw AForm::GradeTooLowException(); - // Other things... + + // ShrubberyCreation form action... + std::string filename = this->target + "_shrubbery"; + std::ofstream file(filename.c_str()); + + file << " _-_\n"; + file << " /~~ ~~\\\n"; + file << " /~~ ~~\\\n"; + file << "{ }\n"; + file << " \\ _- -_ /\n"; + file << " ~ \\ // ~\n"; + file << "_- - | | _- _\n"; + file << " _ - | | -_\n"; + file << " // \\"; + } ////////////////// diff --git a/ex02/ShrubberyCreationForm/ShrubberyCreationForm.hpp b/ex02/ShrubberyCreationForm/ShrubberyCreationForm.hpp index b9303d2..aef0fb9 100644 --- a/ex02/ShrubberyCreationForm/ShrubberyCreationForm.hpp +++ b/ex02/ShrubberyCreationForm/ShrubberyCreationForm.hpp @@ -15,6 +15,7 @@ # define SHRUBBERYCREATIONFORM_HPP # include +# include # include "../AForm/AForm.hpp" class ShrubberyCreationForm : public AForm diff --git a/ex02/main.cpp b/ex02/main.cpp index 3abb033..7825cc6 100644 --- a/ex02/main.cpp +++ b/ex02/main.cpp @@ -6,7 +6,7 @@ /* By: hadi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/02/16 22:32:41 by hadi #+# #+# */ -/* Updated: 2026/02/17 17:49:09 by hadi ### ########.fr */ +/* Updated: 2026/02/17 17:53:10 by hadi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,7 +20,6 @@ int main() try { Bureaucrat angel("Angel", 137); - angel.executeForm(form); angel.signForm(form);