wip: new map

This commit is contained in:
Theo Champion 2025-10-03 23:02:18 +02:00
parent 3673b58106
commit 86e16c46e4
7 changed files with 851 additions and 1 deletions

View file

@ -6,7 +6,7 @@
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/07/17 14:15:26 by kcolin #+# #+# */
/* Updated: 2025/07/17 15:53:29 by kcolin ### ########.fr */
/* Updated: 2025/10/03 21:06:20 by tchampio ### ########.fr */
/* */
/* ************************************************************************** */
@ -48,9 +48,11 @@ bool check_walls(t_mapdata *map)
j = 0;
while (map->map[i][j] == ' ')
j++;
ft_printf("firstwalls\n");
if (map->map[i][j] != '1'
&& map->map[i][ft_strlen(map->map[i]) - 1] != '1')
return (false);
ft_printf("secondwalls\n");
if (i == 0 || i == map->mapheight - 1)
{
while (map->map[i][j] == '1' || map->map[i][j] == ' '
@ -59,6 +61,7 @@ bool check_walls(t_mapdata *map)
if (ft_strlen(map->map[i]) != (unsigned int)j)
return (false);
}
ft_printf("Forbidden\n");
if (has_forbidden_characters(map->map[i]))
return (false);
i++;