int path_finding(char **map_cpy, t_xy cur, t_xy ply, int nbr) { if (cur.x == ply.x && cur.y == ply.y) return (nbr); map_cpy[x][y] = 'x'; if (map_cpy[x][y + 1] != '1' && map_cpy[x][y + 1] != 'x') if (is_possible(map, map_cpy, x, y + 1, nbr++)) if (map_cpy[x + 1][y] != '1' && map_cpy[x + 1][y] != 'x') if (is_possible(map, map_cpy, x + 1, y, nbr)) if (map_cpy[x - 1][y] != '1' && map_cpy[x - 1][y] != 'x') if (is_possible(map, map_cpy, x - 1, y, nbr)) *check = if (map_cpy[x][y - 1] != '1' && map_cpy[x][y - 1] != 'x') if (is_possible(map, map_cpy, x, y - 1, nbr)) *check = 1; return (0); } void move_enemy(t_data *data) { }