/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tischmid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/04 21:50:50 by tischmid #+# #+# */ /* Updated: 2023/04/05 09:33:15 by tischmid ### ########.fr */ /* */ /* ************************************************************************** */ #include #include "solution.h" #include "printing.h" char *ft_strcpy(char *dest, char *src) { char *o_dest; o_dest = dest; while (*src) *dest++ = *src++; *dest = 0; return (o_dest); } // int argc, char **argv // (void)argc; // (void)argv; int main(void) { t_map map; int ret; ret = read_fname("./assets/map2", &map); free(map.data); map.data = malloc(sizeof(char) * 244); map.copy = malloc(sizeof(char) * 244); ft_strcpy(map.data, \ "..........................." "....o......................" "............o.............." "..........................." "....o......................" "...............o..........." "..........................." "......o..............o....." "..o.......o................"); ft_strcpy(map.copy, map.data); print_map(&map, 0); printf("######## STARTED SOLVE ########\n"); solve(&map); printf("######## FINISHED SOLVE ########\n"); fflush(stdout); print_map(&map, 0); free(map.data); free(map.copy); } // printf("Reading file ret val: %d\n", ret); // printf("Height: %d\n", map.meta.height); // printf("Width: %d\n", map.meta.width); // printf("Map len: %zu\n", ft_strlen(map.data)); // printf("Map 1d:\n\"%s\"\n", map.data); // fflush(stdout); // return (0);