Remove unnecesary check in obstacle count
This commit is contained in:
parent
dc8da0ae48
commit
ef28991e7c
|
@ -6,7 +6,7 @@
|
|||
/* By: apago <apago@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/04 21:46:57 by tischmid #+# #+# */
|
||||
/* Updated: 2023/04/05 19:06:00 by apago ### ########.fr */
|
||||
/* Updated: 2023/04/05 19:59:57 by tischmid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -38,8 +38,6 @@ int count_obstacles(t_map *map, int idx, int sq_size)
|
|||
|
||||
if (sq_size == 0)
|
||||
return (0);
|
||||
if (sq_size == 1)
|
||||
return (get_index(map, idx, 0, 0));
|
||||
if (idx + (sq_size - 1) * (map->meta.width + 1) > map->meta.width
|
||||
* map->meta.height)
|
||||
return (-1);
|
||||
|
|
Loading…
Reference in New Issue