added start-end check
if start and end are linked, push all the ants through
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user