clean pour merge

This commit is contained in:
Hugo LAMY
2019-06-01 15:58:31 +02:00
parent 2d06dcf837
commit c81b7515be
122 changed files with 0 additions and 7867 deletions

19
.gitignore vendored
View File

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

View File

@@ -1,55 +0,0 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# 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

View File

@@ -1,24 +0,0 @@
# 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
View File

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

View File

@@ -1,100 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* f_bonus_opti.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/06/01 14:06:37 by hulamy #+# #+# */
/* Updated: 2019/06/01 14:06:40 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** Test optimisation for not testing wrong maps when tetri are identical
*/
int check_tetri_memory(t_fillist *list, int pos)
{
t_fillist *tetri;
unsigned int mask;
tetri = list;
mask = 1 << ((pos % 32) - 1);
if (tetri->same)
{
if (!(tetri->same->memory[pos / 32] & mask))
return (tetri->same->memory[pos / 32] |= mask);
}
else
{
if (!(tetri->memory[pos / 32] & mask))
return (tetri->memory[pos / 32] |= mask);
}
return (0);
}
/*
** Test optimisation for not testing wrong maps when tetri are identical
*/
int compare_tetri(t_fillist *tetri_a, t_fillist *tetri_b)
{
if (tetri_a->tetribit != tetri_b->tetribit)
return (0);
if (tetri_a->width != tetri_b->width)
return (0);
if (tetri_a->height != tetri_b->height)
return (0);
return (1);
}
/*
** Function that free the list->memory each time it's malloc
*/
t_fillist *clean_list_memory(t_fillist *list, t_fillist *tmp)
{
while (tmp)
{
if (tmp->memory)
free(tmp->memory);
tmp = tmp->next;
}
return (list);
}
/*
** Test optimisation for not testing wrong maps when tetri are identical
*/
int check_same_tetri(t_fillist *list, int num)
{
t_fillist *curr_tetri;
t_fillist *next_tetri;
int i;
curr_tetri = clean_list_memory(list, list);
while (curr_tetri != NULL)
{
i = 0;
if (!curr_tetri->memory && !(curr_tetri->memory =
(unsigned int *)malloc(sizeof(*curr_tetri->memory) * num)))
return (0);
while (i < num)
curr_tetri->memory[i++] = 0;
next_tetri = curr_tetri->next;
while (next_tetri != NULL)
{
if (compare_tetri(curr_tetri, next_tetri))
if (next_tetri->same == NULL)
next_tetri->same = curr_tetri;
next_tetri = next_tetri->next;
}
curr_tetri->total_num = num;
curr_tetri = curr_tetri->next;
}
return (1);
}

View File

@@ -1,76 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* f_bonus_print.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/27 13:46:29 by hulamy #+# #+# */
/* Updated: 2019/05/29 18:31:22 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** function that print the given tetris if flag p is present
*/
int print_tetri(t_fillist *list, int size)
{
unsigned int print;
if (list->dope[2])
{
while (list && ++size)
{
check_same_tetri(list, 1);
print = list->tetribit;
print <<= 16;
print_sized_map(&print, list->width, list->height, list->letter);
if (list->same && list->dope[1])
{
print = list->same->tetribit;
print <<= 16;
ft_putstr("same --> ");
ft_put_tetri_color(list->same->letter);
ft_putchar('\n');
}
ft_putchar('\n');
list = list->next;
}
}
return (size);
}
/*
** function that print the map in binary if flag p is present
** it returns anyway the size of the map for main to print it
*/
int print_binary_map(unsigned int *map, int size, int *dope)
{
size--;
if (dope[2])
{
ft_putendl("result in binary :");
print_sized_map(map, size, size, '#');
ft_putchar('\n');
}
free(map);
return (size);
}
/*
** function that print the flags usage
*/
int print_flags_usage(void)
{
ft_putendl("flags usage :");
ft_putendl("d : debug print (print the map during the backtracking)");
ft_putendl("o : optimisation ultra fast but with some errors still");
ft_putendl("p : print the tetri and the map in different formats");
ft_putendl("e : error msgs more precise AND no error for too much tetri\n");
return (0);
}

View File

@@ -1,133 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* f_handle_errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/01 13:29:05 by vmanzoni #+# #+# */
/* Updated: 2019/05/29 15:55:03 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** Function that display error message *s on fd and exit program
*/
void print_error(char *str)
{
write(1, str, ft_strlen(str));
exit(0);
}
/*
** Function that display error message *s on fd with more informations
*/
void print_error_extended(int error, int *dope)
{
if (!dope[3])
print_error("error\n");
if (error == 1)
print_error("error: File contains char other than '.','#' and '\\n'\n");
if (error == 2)
print_error("error: File contains two tetriminos not"
"separated by a '\\n'\n");
if (error == 3)
print_error("error: File contains more than 2 '\\n' in a row\n");
if (error == 4)
print_error("error: File contains less than 1 tetrimino "
"or more than 26\n");
if (error == 5)
print_error("error: Tetrimino has more or less than 4 #\n");
if (error == 6)
print_error("error: Tetrimino # are not all connected\n");
print_error("error\n");
}
/*
** Function to see if there if an error if the file
** - less than 4 lines
** - more than 104 (26 tetri) + 25 (\n) = 129 lines
** - two \n in a row
*/
void check_file_errors(char *file, int *dope)
{
int i;
int line_nbr;
i = 0;
line_nbr = 0;
while (file[i])
{
if (file[i] != '.' && file[i] != '#' && file[i] != '\n')
print_error_extended(1, dope);
else if (file[i] == '\n')
line_nbr++;
if (file[i] == '\n' && line_nbr % 5 == 0 && file[i-1] != '\n')
print_error_extended(2, dope);
if (file[i] == '\n' && file[i+1] != '\0' && \
file[i+2] != '.' && file[i+2] != '#')
print_error_extended(3, dope);
i++;
}
if (line_nbr < 4 || line_nbr > 129)
print_error_extended(4, dope);
}
/*
** Function that check if tetrimino square contains:
** - 4 x #
** - 12 x .
*/
int check_tetri_errors(char *tetri)
{
int i;
int htg;
int dot;
i = 0;
htg = 0;
dot = 0;
while (tetri[i])
{
if (tetri[i] == '#')
htg++;
else if (tetri[i] == '.')
dot++;
i++;
}
if (htg != 4 || dot != 12 || check_tetri_errors_proxy(tetri))
return (5 + check_tetri_errors_proxy(tetri));
return (0);
}
/*
** Function that check if 4 # (tetrimino parts) are linked
*/
int check_tetri_errors_proxy(char *tetri)
{
int i;
int j;
i = 0;
j = 0;
while (tetri[i])
{
if (i < 19 && tetri[i] == '#' && tetri[i + 1] == '#')
j++;
if (i > 0 && tetri[i] == '#' && tetri[i - 1] == '#')
j++;
if (i < 15 && tetri[i] == '#' && tetri[i + 5] == '#')
j++;
if (i > 4 && tetri[i] == '#' && tetri[i - 5] == '#')
j++;
i++;
}
return ((j < 6) ? 1 : 0);
}

View File

@@ -1,156 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parse_input.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */
/* Updated: 2019/06/01 14:06:07 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;
tmp->memory = NULL;
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
View File

@@ -1,121 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/30 13:24:28 by hulamy #+# #+# */
/* Updated: 2019/06/01 14:05:45 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');
}

View File

@@ -1,56 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print_map_with_colors.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/03 20:27:22 by vmanzoni #+# #+# */
/* Updated: 2019/05/08 09:02:39 by vmanzoni ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
void ft_putchar(char c)
{
write(1, &c, 1);
}
void ft_putchar_color(char c, char color)
{
if (color == 'R')
write(1, RED, 5);
else if (color == 'B')
write(1, BLU, 5);
else if (color == 'G')
write(1, GRN, 5);
else if (color == 'Y')
write(1, YEL, 5);
else if (color == 'M')
write(1, MAG, 5);
else if (color == 'C')
write(1, CYN, 5);
else if (color == 'W' || !c)
write(1, RESET, 5);
ft_putchar(c);
write(1, RESET, 5);
}
void ft_put_tetri_color(char c)
{
if (c == 'A' || c == 'G' || c == 'M' || c == 'S' || c == 'Y')
ft_putchar_color(c, 'R');
else if (c == 'B' || c == 'H' || c == 'N' || c == 'T' || c == 'Z')
ft_putchar_color(c, 'B');
else if (c == 'C' || c == 'I' || c == 'O' || c == 'U')
ft_putchar_color(c, 'G');
else if (c == 'D' || c == 'J' || c == 'P' || c == 'V')
ft_putchar_color(c, 'Y');
else if (c == 'E' || c == 'K' || c == 'Q' || c == 'W')
ft_putchar_color(c, 'M');
else if (c == 'F' || c == 'L' || c == 'R' || c == 'X')
ft_putchar_color(c, 'C');
else
ft_putchar(c);
}

View File

@@ -1,38 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* read_file.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/13 12:09:46 by vmanzoni #+# #+# */
/* Updated: 2019/05/29 16:10:58 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** Function that read and return a ptr to file content
*/
char *read_file(char *file)
{
char buf[BUFF_SIZE];
int fd;
int rv;
int i;
char *result;
if (((fd = open(file, O_RDONLY)) < 0) \
|| ((rv = read(fd, &buf, BUFF_SIZE)) < 0) \
|| !(result = malloc(sizeof(char) * rv)))
return (NULL);
buf[rv - 1] = '\0';
i = -1;
while (buf[++i])
result[i] = buf[i];
result[i] = '\0';
close(fd);
return (result);
}

View File

@@ -1,167 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* f_search_map.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/27 20:47:22 by hulamy #+# #+# */
/* Updated: 2019/06/01 14:04:53 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** function that look if a tretri fit in a place
*/
unsigned int fit_in_place(unsigned int *map, t_fillist *lst, int size, int i)
{
unsigned int tmp;
unsigned int mask;
unsigned int tetri;
int n;
int r;
n = lst->num;
r = lst->rank;
i = lst->height;
tetri = lst->tetribit << 16 >> lst->width;
tmp = 0;
mask = ~0u << (32 - lst->width);
while (i--)
{
if (tmp & tetri)
return (0);
if (r >= 32 && ++n)
r -= 32;
tmp = (mask & (map[n] << r));
if (n + 1 < lst->total_num)
tmp |= (mask & (map[n + 1] >> (32 - r)));
tetri <<= lst->width;
r += size;
}
return (!(tmp & tetri));
}
/*
** function that look for the first place in the map for a tetri
*/
int find_place(unsigned int *map, t_fillist *list, int size)
{
int limit;
int pos;
pos = list->position;
list->place = pos % size;
list->rank = pos % 32;
list->num = pos / 32;
limit = (size - list->height + 1) * size;
while (pos < limit)
{
if (list->rank >= 32 && ++list->num)
list->rank -= 32;
if (list->place > size - list->width)
{
list->place = -1;
pos += list->width - 2;
list->rank += list->width - 2;
}
else if (fit_in_place(map, list, size, 0))
return ((list->position = pos + 1));
pos++;
list->place++;
list->rank++;
}
return (0);
}
/*
** function that add or remove a tetri on the map
*/
void add_remove(unsigned int *map, t_fillist *list, int size)
{
unsigned int mask;
unsigned short tetri;
int i;
int j;
tetri = list->tetribit;
mask = ~0u << (32 - list->width);
i = (list->height - 1) * list->width;
j = (list->height - 1) * size + list->position;
while (j >= list->position)
{
map[(j - 1) / 32] ^= (mask & tetri << (16 + i)) >> (j - 1);
if ((j - 1) / 32 + 1 < list->total_num)
map[(j - 1) / 32 + 1] ^= (mask & tetri << (16 + i)) << (32 - j) << 1;
j -= size;
i -= list->width;
}
}
/*
** Function that recursively try to fill the map with the tetris
*/
int fill_map(unsigned int *map, t_fillist *list, int size)
{
if (!list)
return (1);
list->position = 0;
while (find_place(map, list, size))
{
add_remove(map, list, size);
list->test = 1;
if (list->dope[0])
{
print_letter_map(list->start, size, 1);
ft_putchar('\n');
}
if (list->dope[1])
if (check_tetri_memory(list, list->position))
if (fill_map(map, list->next, size))
return (1);
if (!list->dope[1])
if (fill_map(map, list->next, size))
return (1);
add_remove(map, list, size);
list->test = 0;
}
return (0);
}
/*
** Function that send to "fill_map" a map of a certain size
** and increment its size untill it's solved
*/
int search_map(t_fillist *list)
{
unsigned int *map;
int size;
int num;
int i;
size = 2;
num = print_tetri(list, 0);
while (size * size < num * 4)
size++;
i = 0;
while (!i)
{
num = (size * size) / 32 + 1;
if (!(map = (unsigned int *)malloc(sizeof(*map) * num)))
return (0);
check_same_tetri(list, num);
while (num--)
map[num] = 0;
i = fill_map(map, list, size++);
if (!i)
free(map);
}
return (print_binary_map(map, size, list->dope));
}

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.fillit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

150
fillit.h
View File

@@ -1,150 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fillit.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/01 13:34:46 by vmanzoni #+# #+# */
/* Updated: 2019/06/01 14:03:45 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FILLIT_H
# define FILLIT_H
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdbool.h>
#include "libft/includes/libft.h"
/*
** DEFINE
*/
# define BUFF_SIZE 1024
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#define YEL "\x1B[33m"
#define BLU "\x1B[34m"
#define MAG "\x1B[35m"
#define CYN "\x1B[36m"
#define RESET "\x1B[0m"
/*
** Color for full block tetriminos when printing colored map
** (don't forget to comment all #define COLOR above)
*/
//#define RED "\e[41m"
//#define GRN "\e[42m"
//#define YEL "\e[43m"
//#define BLU "\e[44m"
//#define MAG "\e[45m"
//#define CYN "\e[46m"
//#define RESET "\e[49m"
/*
** STRUCTURE
** tetribit : tetri ecrit en binaire dans un short de 16 bits
** width : largeur du tetri
** height : hauteur du tetri
** position : memorise la position d tetri bit a bit
** place : position sur l'axe des abscisses de la map (position % size)
** rank : position de 1 a 32 dans l'int du tableau d'int (position % 32)
** num : memorise dans quel int du tableau on se trouve (position / 32)
** test : to print the tetri during the backtracking, test is a boolean
** letter : letter of the tetrimino for printing final map
** dope : flags for details, optimisation, printing and error
** memory : positions already tested by a tetrimino in bitwise
** same : pointer to previous identical tetrimino
** next : pointer to next tetrimino
** start : pointer to first tetrimino of input file
*/
typedef struct s_fillist
{
unsigned short tetribit;
int width;
int height;
int position;
int place;
int rank;
int num;
int total_num;
int test;
char letter;
int *dope;
unsigned int *memory;
struct s_fillist *same;
struct s_fillist *next;
struct s_fillist *start;
} t_fillist;
/*
** bonus_print.c
*/
int print_tetri(t_fillist *list, int size);
int print_binary_map(unsigned int *map, int size, int *dope);
int print_flags_usage(void);
/*
** bonus_opti.c
*/
int check_tetri_memory(t_fillist *list, int pos);
int compare_tetri(t_fillist *tetri_a, t_fillist *tetri_b);
t_fillist *clean_list_memory(t_fillist *list, t_fillist *tmp);
int check_same_tetri(t_fillist *list, int num);
/*
** main.c
*/
int main(int argc, char **argv);
int *create_dope(char *av, int mdp);
void clean_list(t_fillist *list, t_fillist *tmp);
int is_mdp(int ac, char **av);
/*
** read_file.c
*/
char *read_file(char *file);
/*
** handle_errors.c
*/
void print_error(char *s);
void print_error_extended(int error, int *dope);
void check_file_errors(char *file, int *dope);
int check_tetri_errors(char *tetri);
int check_tetri_errors_proxy(char *tetri);
/*
** parse_input.c
*/
int parse_input(char *input, t_fillist **list, int *dope);
int add_to_list(char *sqr, t_fillist **lst, char lett, int *dope);
void fill_list(char line[], t_fillist *list);
unsigned short reduce_tetri(unsigned short tetri, int width);
unsigned short tab_to_bin(char line[]);
/*
** search_map.c
*/
unsigned int fit_in_place(unsigned int *map, t_fillist *lst, int siz, int i);
int find_place(unsigned int *map, t_fillist *list, int size);
void add_remove(unsigned int *map, t_fillist *list, int size);
int fill_map(unsigned int *map, t_fillist *list, int size);
int search_map(t_fillist *list);
/*
** print.c
*/
void print_sized_map(unsigned int *tab, int width, int height, char letter);
char *init_print_map(t_fillist *list, int size);
void print_letter_map(t_fillist *list, int size, int flag);
void print_final_map(t_fillist *list, int size);
void ft_put_tetri_color(char c);
#endif

113
main.c
View File

@@ -1,113 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/12 13:20:48 by vmanzoni #+# #+# */
/* Updated: 2019/06/01 13:58:49 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** Function that put the flags for bonus into a tab of int
**
** d : debug print (print the map during the backtracking)
** o : optimisation ultra fast but with some errors still
** p : print extended (print the tetri and the map in different formats)
** e : error extended (error message more precise AND no error for too much tetri)
*/
int *create_dope(char *av, int mdp)
{
char *comp;
int *dope;
int i;
int j;
comp = "dope";
if (!(dope = (int*)malloc(sizeof(*dope) * 4)))
return (NULL);
i = 0;
while (i < 4)
dope[i++] = 0;
if (!mdp)
return (dope);
i = -1;
while (++i < 4 && (j = -1))
while (av[++j])
if (comp[i] == av[j])
dope[i] = 1;
return (dope);
}
/*
** Function that check if the password is good to unlock the flags
*/
int is_mdp(int ac, char **av)
{
char *mdp;
int i;
if (ac < 3 || ac > 4)
return (0);
mdp = "trompette";
i = 0;
while (av[2][i] && mdp[i] && mdp[i] == av[2][i])
i++;
if (av[2][i] || mdp[i])
return (0);
if (ac == 3)
return (print_flags_usage());
return (1);
}
/*
** Function that free the list
*/
void clean_list(t_fillist *list, t_fillist *tmp)
{
tmp = list;
while (list)
{
list = tmp->next;
free(tmp->memory);
free(tmp);
tmp = list;
}
}
/*
** Main function
*/
int main(int ac, char **av)
{
t_fillist *list;
char *input;
int *dope;
int size;
int mdp;
list = NULL;
dope = create_dope(av[3], (mdp = is_mdp(ac, av)));
if (ac == 2 || mdp)
{
if (!(input = read_file(av[1])))
print_error(dope[3] ? "error: Could not read file.\n" : "error\n");
check_file_errors(input, dope);
size = parse_input(input, &list, dope);
print_final_map(list, size);
free(input);
clean_list(list, list);
}
else
print_error("usage: Please submit a file.\n> ./fillit file.fillit\n");
free(dope);
return (0);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1 +0,0 @@

View File

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

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