From 3b9a1d7dcc5683b962f2bf24795e80e1c449cd1f Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 15 Jul 2019 08:15:37 +0200 Subject: c07 passed, c08 in progress, rush01(+ 6x6 try) --- rush01/ex00/include.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 rush01/ex00/include.h (limited to 'rush01/ex00/include.h') diff --git a/rush01/ex00/include.h b/rush01/ex00/include.h new file mode 100644 index 0000000..4d0bf1c --- /dev/null +++ b/rush01/ex00/include.h @@ -0,0 +1,48 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* include.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/13 12:07:59 by cacharle #+# #+# */ +/* Updated: 2019/07/14 22:49:33 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef INCLUDE_H +# define INCLUDE_H + +# define UNASSIGNED 0 +# define TRUE 1 +# define FALSE 0 + +enum e_view_point +{ + col_up, + col_down, + row_left, + row_right +}; +typedef enum e_view_point t_view_point; +typedef int** t_board; +typedef int** t_views; + +int solve(t_board board, t_views views, int *slv); +int find_next_unassigned(t_board board, int *row, int *col); +int is_alone(t_board board, int bfloor, int row, int col); +int check_viewpoints(t_board board, t_views views); +int check_line(t_board board, t_view_point view, int view_line, + int building_viewed); +t_views parse_arg(char *arg); +int **init_square(int size); +int **dup_square(int **square); +void destroy_square(int **square); +void print_square(t_board board); +int get_with_view(t_board board, t_view_point view, int view_line, + int line_index); +void ft_putchar(char c); +void ft_putnbr(int nb); +int check_arg(char *str); + +#endif -- cgit