-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfillit.h
65 lines (51 loc) · 1.66 KB
/
fillit.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fillit.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: conguyen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/03 13:35:57 by conguyen #+# #+# */
/* Updated: 2022/01/18 15:38:07 by conguyen ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FILLIT_H
# define FILLIT_H
# include <stdlib.h>
# include <fcntl.h>
# include "libft.h"
# include <unistd.h>
typedef struct s_tet
{
int coords[4][2];
int ch;
int x;
int y;
struct s_tet *next;
} t_tet;
/*
** validator.c
*/
int read_input(const int fd, t_tet **tetrimino);
/*
** map.c
*/
unsigned int get_min_map_size(t_tet *tetrimino);
char **create_map(unsigned int size);
char **increment_map(char **map, unsigned int size);
/*
** tetrimino.c
*/
t_tet *create_list(char **tetarray, int lines, int ch);
/*
** free.c
*/
void free_list(t_tet *list);
void free_array(char** tetsarray, int lines);
void free_map(char **map, int map_size);
void free_coords(int **coords);
/*
** solve.c
*/
int solver(t_tet *tetrimino, char **map, int map_size);
#endif