int ft_five(t_point co, t_inv *move, char (*tab)[SIZE], char (*end)[SIZE]) { if (ft_valid(co.x, co.y, SIZE, tab) == 1 || ft_valid(co.x + 1, co.y, SIZE, tab) == 1 || ft_valid(co.x + 1, co.y - 1, SIZE, tab) == 1 || ft_valid(co.x + 2, co.y, SIZE, tab) == 1) return (1); tab[co.x][co.y] = LTR; tab[co.x + 1][co.y] = LTR; tab[co.x + 1][co.y - 1] = LTR; tab[co.x + 2][co.y] = LTR; if (TAB[T + 1] == 0) return (0); ++T; return (ft_filling(move, 0, tab, end)); }
int ft_check(char **s, t_file f) { while (f.y++ < f.m) { if (ft_ln(s[f.y]) != 4 && ft_ln(s[f.y]) != 0) return (-1); } f.y = -1; while (++f.y <= f.m + 1) { f.c = 0; f.h = 0; f.l = 0; f = ft_valid(s, f); if (f.c < 5 || f.h != 4 || f.l != 4 || f.y > 130) return (-1); } return (0); }