aboutsummaryrefslogtreecommitdiff
path: root/rush01_6x6_try/ex00/include.h
blob: 85f595f6349c11cb7df383a44a930e98dd7bbf94 (plain)
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
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   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