clean: norm
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/05/16 14:51:13 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/05/16 16:34:23 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/05/17 16:29:12 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -67,3 +67,19 @@ int get_spawn_position(const char **body, double *spawn_x, double *spawn_y)
|
||||
return (2);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int map_is_in_one_part(const char **body)
|
||||
{
|
||||
int y;
|
||||
|
||||
y = ft_tablen((const void **) body) - 1;
|
||||
while (body[y][0] == '\0' || ft_contain_only(body[y], ' '))
|
||||
y--;
|
||||
while (y > 0)
|
||||
{
|
||||
if (body[y][0] == '\0' || ft_contain_only(body[y], ' '))
|
||||
return (1);
|
||||
y--;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -6,28 +6,12 @@
|
||||
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/05/16 16:30:55 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/05/16 18:59:38 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/06/12 14:29:44 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parsing_private.h"
|
||||
|
||||
int map_is_in_one_part(const char **body)
|
||||
{
|
||||
int y;
|
||||
|
||||
y = ft_tablen((const void **) body) - 1;
|
||||
while (body[y][0] == '\0' || ft_contain_only(body[y], ' '))
|
||||
y--;
|
||||
while (y > 0)
|
||||
{
|
||||
if (body[y][0] == '\0' || ft_contain_only(body[y], ' '))
|
||||
return (1);
|
||||
y--;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int map_surround(const char **body)
|
||||
{
|
||||
int y;
|
||||
|
Reference in New Issue
Block a user