34 lines
1.3 KiB
C
34 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 06:10:06 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);
|
|
}
|
|
s_lstclear(delete);
|
|
return (1);
|
|
}
|