-
Notifications
You must be signed in to change notification settings - Fork 0
/
close.c
33 lines (29 loc) · 1.24 KB
/
close.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* close.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rvan-der <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/16 16:08:03 by rvan-der #+# #+# */
/* Updated: 2017/02/16 18:35:01 by rvan-der ### ########.fr */
/* */
/* ************************************************************************** */
#include "filler.h"
t_skin close_ennemi(t_plateau p)
{
t_skin ret;
(ret.crd).x = 0;
while ((ret.crd).x < (p.size).x)
{
(ret.crd).y = 0;
while ((ret.crd).y < (p.size).y - 1 && \
(p.map)[(ret.crd).y][(ret.crd).x] != p.pl)
{
if (is_ennemi((p.map[(ret.crd).y + 1][(ret.crd).x], p.pl
((ret.crd).y)++;
}
((ret.crd).x)++;
}
return (close_ennemi2(p));
}