mise a la racine des sous dossiers de libt

This commit is contained in:
Hugo LAMY
2019-06-03 22:01:27 +02:00
parent 700fb91632
commit 1aa695c85a
118 changed files with 3358 additions and 250 deletions

38
fillit_roduquen/full_square2.c Executable file
View File

@@ -0,0 +1,38 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* full_square2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: roduquen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/01 17:12:29 by roduquen #+# #+# */
/* Updated: 2019/04/01 17:12:30 by roduquen ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
void full_square6(t_type *square, char tetri, char nbr, int pos)
{
if (tetri == 6)
{
square->str[pos + 1] = nbr;
square->str[pos + 2] = nbr;
square->str[pos] = nbr;
square->str[pos + square->size] = nbr;
}
else if (tetri == 7)
{
square->str[pos] = nbr;
square->str[pos + 1] = nbr;
square->str[pos + 2] = nbr;
square->str[pos + square->size + 2] = nbr;
}
else if (tetri == 8 || tetri == 9)
{
square->str[(tetri == 8 ? pos : pos + 2)] = nbr;
square->str[pos + square->size] = nbr;
square->str[pos + 1 + square->size] = nbr;
square->str[pos + square->size + 2] = nbr;
}
}