-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfillit.h
More file actions
53 lines (46 loc) · 1.79 KB
/
fillit.h
File metadata and controls
53 lines (46 loc) · 1.79 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fillit.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mschroed <mschroed@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/12/28 20:42:25 by mschroed #+# #+# */
/* Updated: 2019/01/06 18:46:07 by mschroed ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FILLIT_H
# define FILLIT_H
# include <unistd.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
# include <errno.h>
# define MINO_SIZE 26
typedef struct s_mino
{
struct s_mino *next;
size_t size;
char **crd;
int id;
} t_mino;
typedef struct s_map
{
char **map;
int size;
} t_map;
t_mino *mino_oc(char *file);
t_mino *fnew_mino(void const *data, size_t size);
void lst_append(t_mino **head, char *buf);
int val_mino(t_mino *head);
char **map(int size);
int place(t_map *mappie, t_mino *minos, int x, int y);
int solved(t_mino *minos);
int mino_len(t_mino *lst);
t_mino *cuter(t_mino *valid, int id);
int piece_reset(t_map *mappie, t_mino *mino, int x, int y);
int placer(t_map *mappie, t_mino *mino, int x, int y);
int map_check(t_map *mappie, t_mino *mino);
t_map *map_new(int size);
void printn2d(char **s, size_t num);
#endif