Merge branch 'tmaze'

merging algorithm to master of project
This commit is contained in:
Tanguy MAZE
2019-04-05 14:06:42 +02:00
7 changed files with 182 additions and 160 deletions

View File

@@ -6,7 +6,7 @@
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/25 06:31:05 by mndhlovu #+# #+# */
/* Updated: 2019/03/25 06:31:09 by mndhlovu ### ########.fr */
/* Updated: 2019/04/05 13:43:21 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,6 +30,9 @@ int main(int ac, char **av)
t_lmdata ldata;
t_holder holder;
int fd;
t_list *it;
t_node *start;
t_node *end;
if (ac == 2)
{
@@ -41,9 +44,21 @@ int main(int ac, char **av)
{
//validation works
ft_printf("Success\n");
it = ldata.nodes;
while (it && ((t_node*)(it->content))->role != 's')
{
ft_printf("=== node ===\nindex: %d\nrole: %c\n\n", ((t_node*)(it->content))->ind, ((t_node*)(it->content))->role);
it = it->next;
}
start = it->content;
it = ldata.nodes;
while (it && ((t_node*)(it->content))->role != 'e')
it = it->next;
end = it->content;
edmunds_karp(&ldata, start->ind, end->ind);
}
else
ft_printf("Fail\n");
}
return (0);
}
}