-
Notifications
You must be signed in to change notification settings - Fork 0
/
push_swap_op2.c
28 lines (24 loc) · 1.13 KB
/
push_swap_op2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap_op2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jeongble <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/21 14:59:38 by jeongble #+# #+# */
/* Updated: 2022/07/22 07:47:25 by jeongble ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
int ra(t_stack *stacks)
{
return (rotate(&(stacks->stack_a), &(stacks->tail_a)));
}
int rb(t_stack *stacks)
{
return (rotate(&(stacks->stack_b), &(stacks->tail_b)));
}
int rr(t_stack *stacks)
{
return (ra(stacks) || rb(stacks));
}