summaryrefslogtreecommitdiff
path: root/cmd_optimization.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-04-17 12:21:25 +0200
committerDominik Kaiser2024-04-17 12:21:25 +0200
commitb0a8aaeddfc5feb8a55d16891e199f635291c66a (patch)
treeba947e8efc2420017e2de620fbdb3958d6bcb023 /cmd_optimization.c
parent26e76f9d7ad46948b0548c41375f81cacf20b47c (diff)
downloadpush_swap-b0a8aaeddfc5feb8a55d16891e199f635291c66a.tar.gz
push_swap-b0a8aaeddfc5feb8a55d16891e199f635291c66a.zip
Add movement (with some bugs)
TODO: Fix sorting direction. Right now the numbers are sorted max -> min instead of min -> max. TODO: Fix sorting bug. Some numbers are not sorted.
Diffstat (limited to 'cmd_optimization.c')
-rw-r--r--cmd_optimization.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd_optimization.c b/cmd_optimization.c
index d0928f5..9fcf876 100644
--- a/cmd_optimization.c
+++ b/cmd_optimization.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/13 16:42:34 by dkaiser #+# #+# */
-/* Updated: 2024/04/17 09:41:10 by dkaiser ### ########.fr */
+/* Updated: 2024/04/17 12:15:41 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -88,5 +88,6 @@ void optimize_commands(t_psdata *data)
{
optimize_redundant(data, PA, PB);
optimize_redundant(data, RB, RRB);
+ optimize_redundant(data, RA, RRA);
optimize_two_stack_ops(data, RA, RB, RR);
}