aboutsummaryrefslogtreecommitdiff
path: root/rush01_6x6_try/ex00/include.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-07-15 08:15:37 +0200
committerCharles <sircharlesaze@gmail.com>2019-07-15 08:15:37 +0200
commit3b9a1d7dcc5683b962f2bf24795e80e1c449cd1f (patch)
tree25b02c02f5140dbefbabd7720f292d8be3d5cc51 /rush01_6x6_try/ex00/include.h
parentc2bf9fcefbb4453cee271ccd1af9674ad2f3a181 (diff)
downloadpiscine-3b9a1d7dcc5683b962f2bf24795e80e1c449cd1f.tar.gz
piscine-3b9a1d7dcc5683b962f2bf24795e80e1c449cd1f.tar.bz2
piscine-3b9a1d7dcc5683b962f2bf24795e80e1c449cd1f.zip
c07 passed, c08 in progress, rush01(+ 6x6 try)
Diffstat (limited to 'rush01_6x6_try/ex00/include.h')
-rw-r--r--rush01_6x6_try/ex00/include.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/rush01_6x6_try/ex00/include.h b/rush01_6x6_try/ex00/include.h
new file mode 100644
index 0000000..85f595f
--- /dev/null
+++ b/rush01_6x6_try/ex00/include.h
@@ -0,0 +1,50 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* include.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/13 12:07:59 by cacharle #+# #+# */
+/* Updated: 2019/07/14 13:22:42 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef INCLUDE_H
+# define INCLUDE_H
+
+//typedef int** t_board;
+//typedef int** t_board;
+
+typedef enum
+{
+ col_up,
+ col_down,
+ row_left,
+ row_right
+} t_view_point;
+typedef struct
+{
+ int size;
+ int **self;
+} t_square;
+typedef t_square t_board;
+typedef t_square t_views;
+
+int solve(t_board board, t_views views);
+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);
+
+#endif