Applied norminette syntax for visual enjoyment

This commit is contained in:
Angel Ortigosa Perez
2025-09-14 13:52:18 +02:00
parent a56df94b5d
commit 661e81b552
24 changed files with 48 additions and 48 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:46:34 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:23:34 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:48:22 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,4 +30,4 @@ Zombie::Zombie(std::string str)
void Zombie::announce( void )
{
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:44:08 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:22:58 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:49:46 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -31,4 +31,4 @@ class Zombie
Zombie* newZombie( std::string name );
void randomChump( std::string name );
#endif
#endif

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 17:04:19 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:19:33 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:48:16 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,9 +14,9 @@
Zombie* newZombie( std::string name )
{
Zombie *z;
Zombie *z;
z = new Zombie(name);
return (z);
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 17:04:38 by aortigos #+# #+# */
/* Updated: 2025/09/07 19:10:34 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:48:12 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,10 +14,10 @@
void randomChump( std::string name )
{
Zombie *z;
Zombie *z;
z = new Zombie(name);
z->announce();
delete (z);
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:42:21 by aortigos #+# #+# */
/* Updated: 2025/09/07 19:08:01 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:50:00 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,7 +14,7 @@
int main()
{
Zombie *z;
Zombie *z;
z = newZombie("Angel");
z->announce();
@@ -24,4 +24,4 @@ int main()
delete(z);
return (0);
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:46:34 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:36:29 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:48:42 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,4 +30,4 @@ void Zombie::setName(std::string str)
void Zombie::announce( void )
{
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:44:08 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:36:21 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:49:47 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,4 +30,4 @@ class Zombie
Zombie* zombieHorde( int N, std::string name );
#endif
#endif

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 17:04:19 by aortigos #+# #+# */
/* Updated: 2025/09/06 01:47:44 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:49:02 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,12 +14,13 @@
Zombie* zombieHorde( int N, std::string name )
{
Zombie *z = new Zombie[N];
Zombie *z;
int i;
z = new Zombie[N];
i = 0;
while (i < N)
z[i++].setName(name);
return (z);
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/05 16:42:21 by aortigos #+# #+# */
/* Updated: 2025/09/08 13:35:53 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:49:56 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,7 +16,7 @@ int main()
{
int i;
int N;
Zombie *z;
Zombie *z;
i = 0;
N = 3;
@@ -27,4 +27,4 @@ int main()
delete[](z);
return (0);
}
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 01:58:01 by aortigos #+# #+# */
/* Updated: 2025/09/08 14:15:19 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:49:52 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,9 +14,9 @@
int main()
{
std::string str = "Hola 42!";
std::string *ptr = &str;
std::string &ref = str;
std::string str = "Hola 42!";
std::string *ptr = &str;
std::string &ref = str;
// Imprimimos las direcciones de memoria
@@ -40,4 +40,4 @@ int main()
std::cout << ref << std::endl;
return (0);
}
}

View File

@@ -20,4 +20,4 @@ void HumanA::attack() const
std::cout << this->name << " attacks with their "
<< this->weapon.getType()
<< std::endl;
}
}

View File

@@ -17,7 +17,7 @@
# include <iostream>
# include "../Weapon/Weapon.hpp"
class HumanA
class HumanA
{
private:
std::string name;

View File

@@ -31,4 +31,4 @@ void HumanB::attack() const
void HumanB::setWeapon(Weapon &w)
{
this->weapon = &w;
}
}

View File

@@ -17,7 +17,7 @@
# include <iostream>
# include "../Weapon/Weapon.hpp"
class HumanB
class HumanB
{
private:
std::string name;

View File

@@ -19,8 +19,7 @@ const std::string& Weapon::getType() const
return (this->type);
}
void Weapon::setType(const std::string &str)
void Weapon::setType(const std::string &str)
{
this->type = str;
}

View File

@@ -16,7 +16,7 @@
# include <iostream>
class Weapon
class Weapon
{
private:
std::string type;

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 02:18:16 by aortigos #+# #+# */
/* Updated: 2025/09/07 19:39:06 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:50:41 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,7 +14,7 @@
#include "HumanA/HumanA.hpp"
#include "HumanB/HumanB.hpp"
int main()
int main()
{
{
Weapon club = Weapon("crude spiked club");

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 14:44:18 by aortigos #+# #+# */
/* Updated: 2025/09/08 14:23:48 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:50:49 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */

View File

@@ -60,4 +60,4 @@ void Harl::complain( std::string level )
i++;
}
}
}

View File

@@ -16,7 +16,7 @@
# include <iostream>
class Harl
class Harl
{
private:
void debug( void );

View File

@@ -6,13 +6,13 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 15:23:33 by aortigos #+# #+# */
/* Updated: 2025/09/06 15:48:52 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:50:59 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "Harl/Harl.hpp"
int main(int argc, char **argv)
int main(int argc, char **argv)
{
Harl h;
@@ -21,4 +21,4 @@ int main(int argc, char **argv)
else
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
return (0);
}
}

View File

@@ -74,4 +74,4 @@ void Harl::complain( std::string level )
std::cout << "[ Probably complaining about insignificant problems ]" << std::endl;;
break;
}
}
}

View File

@@ -16,7 +16,7 @@
# include <iostream>
class Harl
class Harl
{
private:
void debug( void );

View File

@@ -6,13 +6,13 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 15:23:33 by aortigos #+# #+# */
/* Updated: 2025/09/06 15:48:52 by aortigos ### ########.fr */
/* Updated: 2025/09/14 13:51:13 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "Harl/Harl.hpp"
int main(int argc, char **argv)
int main(int argc, char **argv)
{
Harl h;
@@ -21,4 +21,4 @@ int main(int argc, char **argv)
else
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
return (0);
}
}