/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* enemy2.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/06 19:06:57 by erey-bet #+# #+# */ /* Updated: 2023/01/06 19:06:58 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ #include "../so_long.h" int ft_strslen(char **src) { int i; i = 0; while (src[i]) i++; return (i); } int choice(int **map, int *i, int x, int y) { if (map[x][y] != -1) { if (*i == -1 || map[x][y] < *i) { *i = map[x][y]; return (1); } } return (0); }