Push_swap/checker_folder/checker_utils.c
2022-01-19 04:01:40 +01:00

33 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* checker_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/18 02:14:22 by apommier #+# #+# */
/* Updated: 2022/01/19 03:42:58 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#include "../Utils/push_swap.h"
int do_move2(t_list **lst, t_list **lst_b, t_slist *a, t_slist **delete)
{
if (!ft_strcmp("rr\n", a))
{
if (!ra_rb(lst, delete, 'a'))
return (0);
if (!ra_rb(lst_b, delete, 'b'))
return (0);
}
if (!ft_strcmp("rrr\n", a))
{
if (!rra_rrb(lst, delete, 'a'))
return (0);
if (!rra_rrb(lst_b, delete, 'a'))
return (0);
}
return (1);
}