-
Notifications
You must be signed in to change notification settings - Fork 0
/
filler.c
47 lines (43 loc) · 1.47 KB
/
filler.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* filler.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mesafi <mesafi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/13 14:25:01 by mesafi #+# #+# */
/* Updated: 2019/11/22 20:15:14 by mesafi ### ########.fr */
/* */
/* ************************************************************************** */
#include "filler.h"
static void init(t_fill *data)
{
init_queue(&(data->queue));
init_stack(&(data->scope));
data->units = 0;
data->score = -1;
data->result.line = 0;
data->result.column = 0;
}
int main(void)
{
t_fill data;
if (player_concerned(&data) == -1)
return (0);
while (1)
{
init(&data);
if (map_reader(&data) == -1)
return (0);
if (obtain_token(&data) == -1)
return (0);
make_heatmap(&data);
find_out(&data);
ft_putnbr(data.result.line);
ft_putchar(' ');
ft_putnbr(data.result.column);
ft_putchar('\n');
error_handler(&data, data.height, 1, 0);
}
return (0);
}