fix(map checker): Fixed remains of old checking

This commit is contained in:
Theo Champion 2025-10-04 00:09:29 +02:00
parent e457cc5860
commit 3d5372ed2e

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:15:26 by kcolin #+# #+# */ /* Created: 2025/07/17 14:15:26 by kcolin #+# #+# */
/* Updated: 2025/10/03 23:25:16 by tchampio ### ########.fr */ /* Updated: 2025/10/03 23:51:46 by tchampio ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -48,8 +48,8 @@ bool check_walls(t_mapdata *map)
j = 0; j = 0;
while (map->map[i][j] == ' ') while (map->map[i][j] == ' ')
j++; j++;
if (map->map[i][j] != '1' if (ft_strchr("12", map->map[i][j])
&& map->map[i][ft_strlen(map->map[i]) - 1] != '1') && ft_strchr("12", map->map[i][ft_strlen(map->map[i]) - 1]))
return (false); return (false);
if (i == 0 || i == map->mapheight - 1) if (i == 0 || i == map->mapheight - 1)
{ {