merge a la main c pas bien

This commit is contained in:
Hugo LAMY
2019-06-01 16:05:47 +02:00
parent d7dc746779
commit 26a9c9cbac
105 changed files with 5893 additions and 0 deletions

19
.gitignore vendored Normal file
View File

@@ -0,0 +1,19 @@
objs/
*.o
a\.out\.dSYM/
a\.out
*.swo
*.swp
fillit
test_fillit\.c
libft
\.DS_Store

55
Makefile Normal file
View File

@@ -0,0 +1,55 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/03/01 13:24:35 by vmanzoni #+# #+# #
# Updated: 2019/05/29 14:03:03 by vmanzoni ### ########.fr #
# #
# **************************************************************************** #
# - - - - - - - - - - - - - - - #
# VARIABLES #
# - - - - - - - - - - - - - - - #
NAME = fillit
CC = gcc
CFLAGS = -I.
CFLAGS += -Wall -Wextra -Werror
LDFLAGS = -L./libft/
LDLIBS = -lft
SRCS = $(shell find . -depth 1 -type f -not -name '.*' -not -name 'test*' -name '*.c')
TRASH = $(shell find . -depth 1 -name '*.dSYM')
TRASH += $(shell find . -depth 1 -type f -name '*.o')
TRASH += $(shell find . -depth 1 -type f -name '*.swp')
TRASH += $(shell find . -depth 1 -type f -name '*.swo')
TRASH += $(shell find . -depth 1 -type f -name '*.swn')
# - - - - - - - - - - - - - - - #
# RULES #
# - - - - - - - - - - - - - - - #
all: $(NAME)
$(NAME): $(SRCS)
$(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(SRCS) -o $(NAME)
debug: $(SRCS)
$(CC) -g $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(SRCS) -o $(NAME)
lib:
make -C ./libft/
clean:
/bin/rm -rf $(TRASH)
fclean: clean
/bin/rm -rf $(NAME)
re: fclean all

24
README.md Normal file
View File

@@ -0,0 +1,24 @@
# Fillit
Team: **hulamy** and **vmanzoni**
Le but de ce projet est dagencer les Tetriminos entre eux pour former le plus petit carré possible, sachant que ce carré peut présenter des trous quand les pièces données ne semboîtent pas parfaitement.
## To do
- [x] Check if we have a file
- [x] Read file
- [x] Check if there are errors in file
- [x] Check if every tetrimino is valid
- [x] Transform file into tetriminos
- [x] Backtracking for smallest square
- [x] Transform tetriminos to letters
- [x] Print result (Can be done with above step)
- [ ] Free everything (NO LEAKS)
## BONUS
- [x] Best error handler (more details on why there is an error.)
- [x] Optimisation (skip when tetri with same shape was already tested on map)
- [x] Add colors to tetri when printing result map
- [x] Flag for debbuging (print every step in backtracking)
- [x] Adding flags (and password for blocking more args on moulinette)

2
author Normal file
View File

@@ -0,0 +1,2 @@
hulamy
vmanzoni

155
f_parse_input.c Normal file
View File

@@ -0,0 +1,155 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parse_input.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */
/* Updated: 2019/06/01 13:32:38 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** function that transform a tab of . and # into a binary tab of int
*/
unsigned short tab_to_bin(char line[])
{
unsigned short tmp;
int i;
i = 0;
tmp = 0;
while (line[i])
{
tmp <<= 1;
if (line[i] == '\n')
i++;
if (line[i++] == '#')
tmp |= 1;
}
return (tmp);
}
/*
** Function that take a tetrimino of 4*4
** and reduce it to its right size, in binary
*/
unsigned short reduce_tetri(unsigned short tetri, int width)
{
unsigned int mask;
unsigned int tmp;
mask = ~0u << (32 - width) >> 16;
tmp = (mask & tetri);
tmp |= ((mask & tetri << 4) >> width);
tmp |= ((mask & tetri << 8) >> (2 * width));
tmp |= ((mask & tetri << 12) >> (3 * width));
return (tmp);
}
/*
** Function that transforme a tetriminos char* into a short of 16 bites
** and then fills it and its reversed into the list
**
** 1) transforme la ligne de . et # en un short de 0 et 1
** 2) cree un mask avec des 1 sur la colonne de droite (#...#...#...#...)
** 3) utilise le mask pour trouver la largeur que prend le tetriminos
** 4) deplace le tetriminos tout en haut a gauche
** (i - list->width = le nombre de colonne vide a gauche)
** 5) trouve la hauteur du tetri
** 6) fabrique la ligne pour le tetriminos de la bonne largeur
**
** list->test is used to debug the backtracking, allowing to print the
** map each time without the previous tries
*/
void fill_list(char line[], t_fillist *list)
{
unsigned int mask;
int i;
list->tetribit = tab_to_bin(line);
list->memory = 0;
mask = (1 << 15) | (1 << 11) | (1 << 7) | (1 << 3);
i = 0;
while (!(mask & list->tetribit) && i++ < 4)
mask >>= 1;
list->width = i;
while (mask & list->tetribit && ++i < 4)
mask >>= 1;
list->width = i - list->width;
list->tetribit <<= (i - list->width);
while (!(list->tetribit & (~0u << 12)))
list->tetribit <<= 4;
i = 0;
while (i < 4 && list->tetribit & (~0u << 28 >> (i * 4 + 16)))
i++;
list->height = i;
list->tetribit = reduce_tetri(list->tetribit, list->width);
list->same = NULL;
list->test = 0;
}
/*
** Function that creates the linked list and add a new structure
** linked each time needed
*/
int add_to_list(char *line, t_fillist **lst, char letter, int *dope)
{
t_fillist *tmp;
t_fillist *test;
if (!(tmp = (t_fillist*)malloc(sizeof(*tmp))))
return (0);
tmp->next = NULL;
test = *lst;
if (!test)
*lst = tmp;
else
{
while (test->next)
test = test->next;
test->next = tmp;
}
fill_list(line, tmp);
tmp->letter = letter;
tmp->dope = dope;
tmp->start = *lst;
return (1);
}
/*
** Function that parse a file and put each tetrimino in a linked list
*/
int parse_input(char *input, t_fillist **list, int *dope)
{
char tetri[20];
int i;
int j;
int letter;
int size;
i = 0;
letter = 'A';
while (input[i])
{
j = 0;
while (j < 19)
tetri[j++] = input[i++];
tetri[19] = '\0';
if (check_tetri_errors(tetri))
print_error_extended(check_tetri_errors(tetri), dope);
add_to_list(tetri, list, letter++, dope);
while (input[i] && input[i] != '.' && input[i] != '#')
i++;
}
size = search_map(*list);
return (size);
}

121
f_print.c Normal file
View File

@@ -0,0 +1,121 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/30 13:24:28 by hulamy #+# #+# */
/* Updated: 2019/06/01 13:56:50 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** function that print a map of height and width
** usefull to print tetris
*/
void print_sized_map(unsigned int *tab, int width, int height, char letter)
{
int i;
unsigned int mask;
i = 0;
mask = 0;
while (i++ < width)
mask = (mask >> 1) | ((mask | 1) << 31);
i = 0;
while (i < width * height)
{
if (i && !(i % width))
ft_putchar('\n');
if (tab[i / 32] & (1 << (31 - i % 32)))
ft_put_tetri_color(letter);
else
ft_putchar('.');
ft_putchar(' ');
i++;
}
write(1, "\n", 1);
}
/*
** Print the final map with the letters
** if flag value is 0 -> print moulinette version
** if flag value is 0 -> print in color
*/
char *init_print_map(t_fillist *list, int size)
{
char *map;
int i;
int j;
map = (char *)malloc(sizeof(*map) * (size * size + 1));
map[size * size] = '\0';
i = -1;
while (++i < size * size)
map[i] = '.';
while (list)
{
j = 0;
i = -1;
while (++i < list->width * list->height)
{
if (i && i % list->width == 0)
j += size - list->width;
if (1 << (15 - i) & list->tetribit && list->test == 1)
map[list->position + i + j - 1] = list->letter;
}
list = list->next;
}
return (map);
}
/*
** Function that print the map with color if flag = 1
** or for moulinette if flag = 0;
*/
void print_letter_map(t_fillist *list, int size, int flag)
{
int i;
char *map;
map = init_print_map(list, size);
i = -1;
while (++i < size * size)
{
if (i && i % size == 0)
ft_putchar('\n');
if (flag == 0)
ft_putchar(map[i]);
else
{
ft_put_tetri_color(map[i]);
ft_putchar(' ');
}
}
ft_putchar('\n');
free(map);
}
/*
** Function that print the map
*/
void print_final_map(t_fillist *list, int size)
{
if (list->dope[2])
{
ft_putendl("result for humans :");
print_letter_map(list, size, 1);
ft_putchar('\n');
ft_putendl("result for moulinette :");
}
print_letter_map(list, size, 0);
if (list->dope[2])
ft_putchar('\n');
}

79
samples/16square Normal file
View File

@@ -0,0 +1,79 @@
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....

4
samples/1full Normal file
View File

@@ -0,0 +1,4 @@
####
####
####
####

4
samples/1square Normal file
View File

@@ -0,0 +1,4 @@
##..
##..
....
....

4
samples/1tetri Normal file
View File

@@ -0,0 +1,4 @@
#...
#...
#...
#...

4
samples/1tetri_T Normal file
View File

@@ -0,0 +1,4 @@
###.
.#..
....
....

4
samples/1tetri_wrong Normal file
View File

@@ -0,0 +1,4 @@
#...
.#..
#...
#...

129
samples/26square Normal file
View File

@@ -0,0 +1,129 @@
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....

129
samples/26tetri Normal file
View File

@@ -0,0 +1,129 @@
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#

134
samples/27tetri Normal file
View File

@@ -0,0 +1,134 @@
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#

10
samples/2nl Normal file
View File

@@ -0,0 +1,10 @@
...#
...#
...#
...#
...#
...#
...#
...#

9
samples/2tetri Normal file
View File

@@ -0,0 +1,9 @@
...#
...#
...#
...#
....
##..
.##.
....

14
samples/3tetri Normal file
View File

@@ -0,0 +1,14 @@
...#
...#
...#
...#
....
##..
.##.
....
....
###.
.#..
....

14
samples/3tetribis Normal file
View File

@@ -0,0 +1,14 @@
....
##..
.##.
....
...#
...#
...#
...#
....
###.
..#.
....

4
samples/42 Normal file
View File

@@ -0,0 +1,4 @@
4242
4242
4242
4242

19
samples/4square Normal file
View File

@@ -0,0 +1,19 @@
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....

19
samples/4tetri Normal file
View File

@@ -0,0 +1,19 @@
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#
...#

19
samples/4tetribis Normal file
View File

@@ -0,0 +1,19 @@
....
##..
.##.
....
...#
...#
...#
...#
....
###.
..#.
....
....
.##.
.##.
....

24
samples/5square Normal file
View File

@@ -0,0 +1,24 @@
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....

44
samples/9square Normal file
View File

@@ -0,0 +1,44 @@
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....
##..
##..
....
....

19
samples/Non_valide Normal file
View File

@@ -0,0 +1,19 @@
...#
...#
...#
...#
....
....
....
####
.###
...E
....
....
####
####
####
####

BIN
samples/backslash_0 Normal file

Binary file not shown.

4
samples/bad_test Normal file
View File

@@ -0,0 +1,4 @@
.#..
.#..
###.
....

89
samples/debug/jdugoudr Normal file
View File

@@ -0,0 +1,89 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr1 Normal file
View File

@@ -0,0 +1,84 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr10 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr11 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr12 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr13 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr14 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr15 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr16 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr17 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
....
###.
#...
....

79
samples/debug/jdugoudr18 Normal file
View File

@@ -0,0 +1,79 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#

View File

@@ -0,0 +1,79 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#

View File

@@ -0,0 +1,74 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....

View File

@@ -0,0 +1,69 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....

View File

@@ -0,0 +1,64 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....

View File

@@ -0,0 +1,59 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,54 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....

View File

@@ -0,0 +1,49 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#

View File

@@ -0,0 +1,44 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
....
###.
#...
....

View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....

79
samples/debug/jdugoudr1_2 Normal file
View File

@@ -0,0 +1,79 @@
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,74 @@
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,69 @@
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,64 @@
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,59 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,54 @@
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,49 @@
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,44 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

View File

@@ -0,0 +1,39 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_3 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_4 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_5 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_6 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_7 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_8 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

79
samples/debug/jdugoudr1_9 Normal file
View File

@@ -0,0 +1,79 @@
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr2 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr3 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr4 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr5 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr6 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr7 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
#...
##..
.#..
....
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr8 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
....
###.
#...
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

84
samples/debug/jdugoudr9 Normal file
View File

@@ -0,0 +1,84 @@
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....
####
....
....
....
.##.
##..
....
....
##..
.##.
....
....
...#
...#
...#
...#
#...
##..
.#..
....
....
###.
#...
....

114
samples/difficile Normal file
View File

@@ -0,0 +1,114 @@
....
....
..##
.##.
....
.##.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
###.
.#..
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
.###
..#.
....
....
....
..##
.##.
....
....
..##
.##.
..#.
..#.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
..#.
..#.
..##
....
....
..##
.##.
....
....
..##
.##.
....
....
####
....

114
samples/difficile_ou_pas Normal file
View File

@@ -0,0 +1,114 @@
....
....
..##
.##.
....
.##.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
###.
.#..
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
.###
..#.
....
....
....
..##
.##.
....
....
..##
.##.
..#.
..#.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
..#.
..#.
..##
....
....
..##
.##.
....
....
..##
.##.
....
....
####
....i

0
samples/empty Normal file
View File

8
samples/error1 Normal file
View File

@@ -0,0 +1,8 @@
####
....
....
....
####
....
....
....

9
samples/error2 Normal file
View File

@@ -0,0 +1,9 @@
.#..
.##.
..#.
....
.#..
.#..
..#.
..#.

19
samples/full Normal file
View File

@@ -0,0 +1,19 @@
###.
#...
....
....
....
....
#...
###.
....
.##.
.##.
....
...#
...#
...#
...#

20
samples/invalid_sample Normal file
View File

@@ -0,0 +1,20 @@
...#
...#
...#
...#
....
....
....
####
.###
...#
....
....
....
..##
.##.
....

49
samples/map_hard Normal file
View File

@@ -0,0 +1,49 @@
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....

99
samples/map_slack Normal file
View File

@@ -0,0 +1,99 @@
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....
...#
...#
..##
....
#...
###.
....
....
.#..
.#..
##..
....
...#
...#
..##
....

1
samples/newline Normal file
View File

@@ -0,0 +1 @@

14
samples/opti_test Normal file
View File

@@ -0,0 +1,14 @@
...#
.###
....
....
....
#...
##..
.#..
##..
.##.
....
....

19
samples/sujet_1 Normal file
View File

@@ -0,0 +1,19 @@
....
##..
.#..
.#..
....
####
....
....
#...
###.
....
....
....
##..
.##.
....

39
samples/sujet_2 Normal file
View File

@@ -0,0 +1,39 @@
...#
...#
...#
...#
....
....
....
####
.###
...#
....
....
....
..##
.##.
....
....
.##.
.##.
....
....
....
##..
.##.
##..
.#..
.#..
....
....
###.
.#..
....

4
samples/test Normal file
View File

@@ -0,0 +1,4 @@
..#.
..#.
..#.
..

34
samples/test7 Normal file
View File

@@ -0,0 +1,34 @@
...#
...#
...#
...#
....
....
....
####
.###
...#
....
....
....
..##
.##.
....
....
.##.
.##.
....
....
....
##..
.##.
##..
.#..
.#..
....

54
samples/test_11 Normal file
View File

@@ -0,0 +1,54 @@
....
....
..##
.##.
....
.##.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
###.
.#..
....
....
..##
.##.
....
....
..##
.##.

39
samples/test_8 Normal file
View File

@@ -0,0 +1,39 @@
....
....
..##
.##.
....
.##.
..#.
..#.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.
....
....
..##
.##.

19
samples/test_a Normal file
View File

@@ -0,0 +1,19 @@
....
....
#...
###.
..#.
..#.
.##.
....
.#..
.#..
.#..
.#..
##..
##..
....
....

4
samples/test_bug Normal file
View File

@@ -0,0 +1,4 @@
#...
###.
....
....

19
samples/test_opti Normal file
View File

@@ -0,0 +1,19 @@
..#.
..#.
..##
....
....
.##.
.##.
....
..#.
..#.
..##
....
..#.
..#.
..##
....

Some files were not shown because too many files have changed in this diff Show More