lem_in/srcs/lm_check_errors.c
Tanguy MAZE 3b893147e5 IT WORKS !
functionning ./lem_in that can read maps and display ants path
still need to clean leaks
still need remove debug info
2019-04-09 19:09:29 +02:00

35 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lm_check_errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/02 08:39:09 by mndhlovu #+# #+# */
/* Updated: 2019/04/08 15:43:01 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
int lm_check_room_before(char **tab, t_syntax *synt)
{
if (tab[0] != NULL && tab[1] != NULL && tab[2] != NULL)
{
if (!lm_validate_rooms(tab[0], tab[1], tab[2]))
{
synt->v_error = 1;
return (0);
}
}
return (1);
}
int lm_verify_cmd(t_syntax *synt)
{
if (synt->s_cmd && synt->e_cmd && synt->v_error
&& synt->l_error && synt->e_error)
return (1);
return (0);
}