Applied norminette syntax for visual enjoyment
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:46:34 by aortigos #+# #+# */
|
/* 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 )
|
void Zombie::announce( void )
|
||||||
{
|
{
|
||||||
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
|
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:44:08 by aortigos #+# #+# */
|
/* 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 );
|
Zombie* newZombie( std::string name );
|
||||||
void randomChump( std::string name );
|
void randomChump( std::string name );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 17:04:19 by aortigos #+# #+# */
|
/* 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* newZombie( std::string name )
|
||||||
{
|
{
|
||||||
Zombie *z;
|
Zombie *z;
|
||||||
|
|
||||||
z = new Zombie(name);
|
z = new Zombie(name);
|
||||||
|
|
||||||
return (z);
|
return (z);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 17:04:38 by aortigos #+# #+# */
|
/* 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 )
|
void randomChump( std::string name )
|
||||||
{
|
{
|
||||||
Zombie *z;
|
Zombie *z;
|
||||||
|
|
||||||
z = new Zombie(name);
|
z = new Zombie(name);
|
||||||
z->announce();
|
z->announce();
|
||||||
|
|
||||||
delete (z);
|
delete (z);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:42:21 by aortigos #+# #+# */
|
/* 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()
|
int main()
|
||||||
{
|
{
|
||||||
Zombie *z;
|
Zombie *z;
|
||||||
|
|
||||||
z = newZombie("Angel");
|
z = newZombie("Angel");
|
||||||
z->announce();
|
z->announce();
|
||||||
@@ -24,4 +24,4 @@ int main()
|
|||||||
delete(z);
|
delete(z);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:46:34 by aortigos #+# #+# */
|
/* 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 )
|
void Zombie::announce( void )
|
||||||
{
|
{
|
||||||
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
|
std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:44:08 by aortigos #+# #+# */
|
/* 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 );
|
Zombie* zombieHorde( int N, std::string name );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 17:04:19 by aortigos #+# #+# */
|
/* 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* zombieHorde( int N, std::string name )
|
||||||
{
|
{
|
||||||
Zombie *z = new Zombie[N];
|
Zombie *z;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
z = new Zombie[N];
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < N)
|
while (i < N)
|
||||||
z[i++].setName(name);
|
z[i++].setName(name);
|
||||||
|
|
||||||
return (z);
|
return (z);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/05 16:42:21 by aortigos #+# #+# */
|
/* 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 i;
|
||||||
int N;
|
int N;
|
||||||
Zombie *z;
|
Zombie *z;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
N = 3;
|
N = 3;
|
||||||
@@ -27,4 +27,4 @@ int main()
|
|||||||
delete[](z);
|
delete[](z);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/06 01:58:01 by aortigos #+# #+# */
|
/* 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()
|
int main()
|
||||||
{
|
{
|
||||||
std::string str = "Hola 42!";
|
std::string str = "Hola 42!";
|
||||||
std::string *ptr = &str;
|
std::string *ptr = &str;
|
||||||
std::string &ref = str;
|
std::string &ref = str;
|
||||||
|
|
||||||
// Imprimimos las direcciones de memoria
|
// Imprimimos las direcciones de memoria
|
||||||
|
|
||||||
@@ -40,4 +40,4 @@ int main()
|
|||||||
std::cout << ref << std::endl;
|
std::cout << ref << std::endl;
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ void HumanA::attack() const
|
|||||||
std::cout << this->name << " attacks with their "
|
std::cout << this->name << " attacks with their "
|
||||||
<< this->weapon.getType()
|
<< this->weapon.getType()
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# include <iostream>
|
# include <iostream>
|
||||||
# include "../Weapon/Weapon.hpp"
|
# include "../Weapon/Weapon.hpp"
|
||||||
|
|
||||||
class HumanA
|
class HumanA
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|||||||
@@ -31,4 +31,4 @@ void HumanB::attack() const
|
|||||||
void HumanB::setWeapon(Weapon &w)
|
void HumanB::setWeapon(Weapon &w)
|
||||||
{
|
{
|
||||||
this->weapon = &w;
|
this->weapon = &w;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# include <iostream>
|
# include <iostream>
|
||||||
# include "../Weapon/Weapon.hpp"
|
# include "../Weapon/Weapon.hpp"
|
||||||
|
|
||||||
class HumanB
|
class HumanB
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ const std::string& Weapon::getType() const
|
|||||||
return (this->type);
|
return (this->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Weapon::setType(const std::string &str)
|
void Weapon::setType(const std::string &str)
|
||||||
{
|
{
|
||||||
this->type = str;
|
this->type = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
|
|
||||||
class Weapon
|
class Weapon
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string type;
|
std::string type;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/06 02:18:16 by aortigos #+# #+# */
|
/* 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 "HumanA/HumanA.hpp"
|
||||||
#include "HumanB/HumanB.hpp"
|
#include "HumanB/HumanB.hpp"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
Weapon club = Weapon("crude spiked club");
|
Weapon club = Weapon("crude spiked club");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/06 14:44:18 by aortigos #+# #+# */
|
/* 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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -60,4 +60,4 @@ void Harl::complain( std::string level )
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
|
|
||||||
class Harl
|
class Harl
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
void debug( void );
|
void debug( void );
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/06 15:23:33 by aortigos #+# #+# */
|
/* 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"
|
#include "Harl/Harl.hpp"
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Harl h;
|
Harl h;
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ int main(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
|
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,4 @@ void Harl::complain( std::string level )
|
|||||||
std::cout << "[ Probably complaining about insignificant problems ]" << std::endl;;
|
std::cout << "[ Probably complaining about insignificant problems ]" << std::endl;;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
|
|
||||||
class Harl
|
class Harl
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
void debug( void );
|
void debug( void );
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/06 15:23:33 by aortigos #+# #+# */
|
/* 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"
|
#include "Harl/Harl.hpp"
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Harl h;
|
Harl h;
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ int main(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
|
std::cout << "Uso: ./harl {DEBUG | INFO | WARNING | ERROR}" << std::endl;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user