added start-end check

if start and end are linked, push all the ants through
This commit is contained in:
Tanguy MAZE
2019-05-02 14:35:37 +02:00
parent a40b6b00e7
commit 3156bddf27
6 changed files with 12746 additions and 10566 deletions

View File

@@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/10 11:23:36 by tmaze #+# #+# */
/* Updated: 2019/04/30 07:06:08 by mndhlovu ### ########.fr */
/* Updated: 2019/05/02 14:33:30 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -69,3 +69,18 @@ t_ind *get_node_path(t_ind *lst, int index)
it = it->next;
return (it);
}
void push_ants_end(t_lmdata *data, char *e_name)
{
int i;
i = 1;
while (i <= data->nbants)
{
ft_printf("L%d-%s", i, e_name);
if (i != data->nbants)
ft_putchar(' ');
i++;
}
ft_printf("\n");
}