/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* parsing2.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet patern[i] != NULL) i++; patern2 = ft_calloc(i + 1, sizeof(char *)); if (patern2 == NULL) return (0); i = 0; while (map->patern[i] != NULL) { patern2[i] = ft_strdup(map->patern[i]); if (patern2[i] == NULL) { ft_cancel(patern2, i); return (0); } i++; } patern2[i] = NULL; ft_fill_pos(map); ft_collector(patern2, map->player_pos[0], map->player_pos[1]); ok = ft_test_map_content2(patern2); ft_freer_tab_ultimate(1, patern2); return (ok); }