From 0440e4ae5c2c2b7e5fe70e5230e67b4043f0cbda Mon Sep 17 00:00:00 2001 From: Mahaut Latinis Date: Tue, 3 Oct 2023 23:16:11 +0200 Subject: [PATCH] feat: init (#1) --- .github/workflows/macos-check.yml | 18 + .github/workflows/norminette.yml | 17 + Makefile | 71 -- push_swap | Bin 52504 -> 0 bytes push_swap.h | 23 - push_swap/Makefile | 71 ++ .../srcs}/checker_bonus/.DS_Store | Bin .../srcs}/checker_bonus/get_next_line.c | 0 .../srcs}/checker_bonus/get_next_line_utils.c | 0 {srcs => push_swap/srcs}/checker_bonus/main.c | 6 +- {srcs => push_swap/srcs}/common/.DS_Store | Bin .../srcs}/common/actions/push_stack.c | 0 .../common/actions/reverse_rotate_stack.c | 0 .../srcs}/common/actions/rotate_stack.c | 0 .../srcs}/common/actions/swap_stack.c | 0 {srcs => push_swap/srcs}/common/exit/exit.c | 0 .../srcs}/common/parsing/parsing_utils.c | 0 .../srcs}/common/stack/stack_utils0.c | 0 .../srcs}/common/stack/stack_utils1.c | 0 .../srcs}/common/stack/stack_utils2.c | 0 .../srcs}/common/stack/stack_utils3.c | 0 .../srcs}/common/utils/utils0.c | 0 .../include/checker_bonus/checker_bonus.h | 0 .../srcs}/include/common/common.h | 0 .../srcs}/include/sorter/sorter.h | 0 .../srcs/sorter}/.DS_Store | Bin 6148 -> 6148 bytes .../srcs}/sorter/long_suites/.DS_Store | Bin .../sorter/long_suites/step1_target_index.c | 0 .../sorter/long_suites/step2_keep_push.c | 15 +- .../long_suites/step3_find_shortest_action.c | 0 .../srcs}/sorter/long_suites/step4_sort.c | 0 {srcs => push_swap/srcs}/sorter/main.c | 0 .../srcs}/sorter/short_suites/short_suites.c | 0 push_swap_visualizer/.clang-format | 137 ---- push_swap_visualizer/.gitignore | 3 - push_swap_visualizer/CMakeLists.txt | 12 - push_swap_visualizer/LICENSE | 674 ------------------ push_swap_visualizer/README.md | 32 - .../dependencies/CMakeLists.txt | 31 - .../dependencies/catch2/CMakeLists.txt | 4 - .../dependencies/imgui-sfml/CMakeLists.txt | 7 - .../dependencies/sfml/CMakeLists.txt | 7 - push_swap_visualizer/imgui.ini | 19 - push_swap_visualizer/include/gui.h | 39 - push_swap_visualizer/include/pushswap.h | 17 - push_swap_visualizer/include/queues.h | 38 - push_swap_visualizer/include/utils.h | 12 - push_swap_visualizer/push_swap | Bin 50968 -> 0 bytes push_swap_visualizer/src/CMakeLists.txt | 13 - push_swap_visualizer/src/gui.cpp | 239 ------- push_swap_visualizer/src/main.cpp | 7 - push_swap_visualizer/src/pushswap.cpp | 27 - push_swap_visualizer/src/queues.cpp | 221 ------ push_swap_visualizer/src/utils.cpp | 27 - push_swap_visualizer/tests/CMakeLists.txt | 4 - push_swap_visualizer/tests/test_pushswap.cpp | 10 - push_swap_visualizer/tests/test_queues.cpp | 84 --- pyviz.py | 228 ------ srcs/.DS_Store | Bin 8196 -> 0 bytes srcs/common/actions/push_stack.o | Bin 2384 -> 0 bytes srcs/common/actions/reverse_rotate_stack.o | Bin 1528 -> 0 bytes srcs/common/actions/rotate_stack.o | Bin 1800 -> 0 bytes srcs/common/actions/swap_stack.o | Bin 1624 -> 0 bytes srcs/common/exit/exit.o | Bin 1400 -> 0 bytes srcs/common/parsing/parsing_utils.o | Bin 1528 -> 0 bytes srcs/common/stack/stack_utils0.o | Bin 1952 -> 0 bytes srcs/common/stack/stack_utils1.o | Bin 976 -> 0 bytes srcs/common/stack/stack_utils2.o | Bin 2120 -> 0 bytes srcs/common/stack/stack_utils3.o | Bin 1176 -> 0 bytes srcs/common/utils/utils0.o | Bin 800 -> 0 bytes srcs/sorter/.DS_Store | Bin 6148 -> 0 bytes srcs/sorter/long_suites/step1_target_index.o | Bin 1856 -> 0 bytes srcs/sorter/long_suites/step2_keep_push.o | Bin 1616 -> 0 bytes .../long_suites/step3_find_shortest_action.o | Bin 2104 -> 0 bytes srcs/sorter/long_suites/step4_sort.o | Bin 1536 -> 0 bytes srcs/sorter/main.o | Bin 2120 -> 0 bytes srcs/sorter/short_suites/short_suites.o | Bin 3008 -> 0 bytes 77 files changed, 114 insertions(+), 1999 deletions(-) create mode 100644 .github/workflows/macos-check.yml create mode 100644 .github/workflows/norminette.yml delete mode 100644 Makefile delete mode 100755 push_swap delete mode 100644 push_swap.h create mode 100644 push_swap/Makefile rename {srcs => push_swap/srcs}/checker_bonus/.DS_Store (100%) rename {srcs => push_swap/srcs}/checker_bonus/get_next_line.c (100%) rename {srcs => push_swap/srcs}/checker_bonus/get_next_line_utils.c (100%) rename {srcs => push_swap/srcs}/checker_bonus/main.c (93%) rename {srcs => push_swap/srcs}/common/.DS_Store (100%) rename {srcs => push_swap/srcs}/common/actions/push_stack.c (100%) rename {srcs => push_swap/srcs}/common/actions/reverse_rotate_stack.c (100%) rename {srcs => push_swap/srcs}/common/actions/rotate_stack.c (100%) rename {srcs => push_swap/srcs}/common/actions/swap_stack.c (100%) rename {srcs => push_swap/srcs}/common/exit/exit.c (100%) rename {srcs => push_swap/srcs}/common/parsing/parsing_utils.c (100%) rename {srcs => push_swap/srcs}/common/stack/stack_utils0.c (100%) rename {srcs => push_swap/srcs}/common/stack/stack_utils1.c (100%) rename {srcs => push_swap/srcs}/common/stack/stack_utils2.c (100%) rename {srcs => push_swap/srcs}/common/stack/stack_utils3.c (100%) rename {srcs => push_swap/srcs}/common/utils/utils0.c (100%) rename {srcs => push_swap/srcs}/include/checker_bonus/checker_bonus.h (100%) rename {srcs => push_swap/srcs}/include/common/common.h (100%) rename {srcs => push_swap/srcs}/include/sorter/sorter.h (100%) rename {srcs/include => push_swap/srcs/sorter}/.DS_Store (78%) rename {srcs => push_swap/srcs}/sorter/long_suites/.DS_Store (100%) rename {srcs => push_swap/srcs}/sorter/long_suites/step1_target_index.c (100%) rename {srcs => push_swap/srcs}/sorter/long_suites/step2_keep_push.c (76%) rename {srcs => push_swap/srcs}/sorter/long_suites/step3_find_shortest_action.c (100%) rename {srcs => push_swap/srcs}/sorter/long_suites/step4_sort.c (100%) rename {srcs => push_swap/srcs}/sorter/main.c (100%) rename {srcs => push_swap/srcs}/sorter/short_suites/short_suites.c (100%) delete mode 100644 push_swap_visualizer/.clang-format delete mode 100644 push_swap_visualizer/.gitignore delete mode 100644 push_swap_visualizer/CMakeLists.txt delete mode 100644 push_swap_visualizer/LICENSE delete mode 100644 push_swap_visualizer/README.md delete mode 100644 push_swap_visualizer/dependencies/CMakeLists.txt delete mode 100644 push_swap_visualizer/dependencies/catch2/CMakeLists.txt delete mode 100644 push_swap_visualizer/dependencies/imgui-sfml/CMakeLists.txt delete mode 100644 push_swap_visualizer/dependencies/sfml/CMakeLists.txt delete mode 100644 push_swap_visualizer/imgui.ini delete mode 100644 push_swap_visualizer/include/gui.h delete mode 100644 push_swap_visualizer/include/pushswap.h delete mode 100644 push_swap_visualizer/include/queues.h delete mode 100644 push_swap_visualizer/include/utils.h delete mode 100755 push_swap_visualizer/push_swap delete mode 100644 push_swap_visualizer/src/CMakeLists.txt delete mode 100644 push_swap_visualizer/src/gui.cpp delete mode 100644 push_swap_visualizer/src/main.cpp delete mode 100644 push_swap_visualizer/src/pushswap.cpp delete mode 100644 push_swap_visualizer/src/queues.cpp delete mode 100644 push_swap_visualizer/src/utils.cpp delete mode 100644 push_swap_visualizer/tests/CMakeLists.txt delete mode 100644 push_swap_visualizer/tests/test_pushswap.cpp delete mode 100644 push_swap_visualizer/tests/test_queues.cpp delete mode 100644 pyviz.py delete mode 100644 srcs/.DS_Store delete mode 100644 srcs/common/actions/push_stack.o delete mode 100644 srcs/common/actions/reverse_rotate_stack.o delete mode 100644 srcs/common/actions/rotate_stack.o delete mode 100644 srcs/common/actions/swap_stack.o delete mode 100644 srcs/common/exit/exit.o delete mode 100644 srcs/common/parsing/parsing_utils.o delete mode 100644 srcs/common/stack/stack_utils0.o delete mode 100644 srcs/common/stack/stack_utils1.o delete mode 100644 srcs/common/stack/stack_utils2.o delete mode 100644 srcs/common/stack/stack_utils3.o delete mode 100644 srcs/common/utils/utils0.o delete mode 100644 srcs/sorter/.DS_Store delete mode 100644 srcs/sorter/long_suites/step1_target_index.o delete mode 100644 srcs/sorter/long_suites/step2_keep_push.o delete mode 100644 srcs/sorter/long_suites/step3_find_shortest_action.o delete mode 100644 srcs/sorter/long_suites/step4_sort.o delete mode 100644 srcs/sorter/main.o delete mode 100644 srcs/sorter/short_suites/short_suites.o diff --git a/.github/workflows/macos-check.yml b/.github/workflows/macos-check.yml new file mode 100644 index 0000000..03ae6c9 --- /dev/null +++ b/.github/workflows/macos-check.yml @@ -0,0 +1,18 @@ +name: tests macos + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - name: mandatory tests + run: cd push_swap; make; ./push_swap 1 2 3 4 5; + shell: bash diff --git a/.github/workflows/norminette.yml b/.github/workflows/norminette.yml new file mode 100644 index 0000000..1a15fe9 --- /dev/null +++ b/.github/workflows/norminette.yml @@ -0,0 +1,17 @@ +name: norminette + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + norminette_job: + runs-on: ubuntu-latest + name: norminette + steps: + - uses: actions/checkout@v2 + - uses: alexandregv/norminette-action@v3 + with: + flags: './push_swap' diff --git a/Makefile b/Makefile deleted file mode 100644 index af3357e..0000000 --- a/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# **************************************************************************** # -# # -# ::: :::::::: # -# Makefile :+: :+: :+: # -# +:+ +:+ +:+ # -# By: user42 +#+ +:+ +#+ # -# +#+#+#+#+#+ +#+ # -# Created: 2021/05/29 11:04:13 by user42 #+# #+# # -# Updated: 2021/06/17 15:05:21 by malatini ### ########.fr # -# # -# **************************************************************************** # - -SRCS_SORTER = ./srcs/sorter/main.c \ - ./srcs/sorter/short_suites/short_suites.c \ - ./srcs/sorter/long_suites/step1_target_index.c \ - ./srcs/sorter/long_suites/step2_keep_push.c \ - ./srcs/sorter/long_suites/step3_find_shortest_action.c \ - ./srcs/sorter/long_suites/step4_sort.c \ - -SRCS_COMMON = ./srcs/common/stack/stack_utils0.c \ - ./srcs/common/stack/stack_utils1.c \ - ./srcs/common/stack/stack_utils2.c \ - ./srcs/common/stack/stack_utils3.c \ - ./srcs/common/utils/utils0.c \ - ./srcs/common/actions/push_stack.c \ - ./srcs/common/actions/reverse_rotate_stack.c \ - ./srcs/common/actions/rotate_stack.c \ - ./srcs/common/actions/swap_stack.c \ - ./srcs/common/parsing/parsing_utils.c \ - ./srcs/common/exit/exit.c \ - -SRCS_CHECKER = ./srcs/checker_bonus/get_next_line.c \ - ./srcs/checker_bonus/get_next_line_utils.c \ - ./srcs/checker_bonus/main.c \ - -OBJS_SORTER = ${SRCS_SORTER:.c=.o} -OBJS_COMMON = ${SRCS_COMMON:.c=.o} -OBJS_CHECKER = ${SRCS_CHECKER:.c=.o} - -INCLUDE = ./srcs/include - -NAME = push_swap -NAME_CHECKER = checker - -CC = gcc -CFLAGS = -Wall -Wextra -Werror -RM = rm -rf - -all: ${NAME} - -.c.o: - ${CC} ${CFLAGS} -I${INCLUDE} -c $< -o ${<:.c=.o} - - -${NAME}: ${OBJS_COMMON} ${OBJS_SORTER} - ${CC} ${CFLAGS} -I${INCLUDE} -o ${NAME} ${OBJS_COMMON} ${OBJS_SORTER} - -${NAME_CHECKER}: ${OBJS_COMMON} ${OBJS_CHECKER} - ${CC} ${CFLAGS} -I${INCLUDE} -o ${NAME_CHECKER} ${OBJS_COMMON} ${OBJS_CHECKER} - -clean: - ${RM} ${OBJS_COMMON} ${OBJS_CHECKER} ${OBJS_SORTER} - -fclean: clean - ${RM} ${NAME} ${NAME_CHECKER} - -re: fclean all - -bonus: checker - -.PHONY: checker bonus all clean fclean re diff --git a/push_swap b/push_swap deleted file mode 100755 index 889497d2a4f669c2e03ad94adc620ebf614e5216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52504 zcmeHPeRy0|nLm?{c0|?*%4!s`5sCz=ZK?%=DVmmEI|Tv(3@a$yPLgRekdN7!NomzQ z3?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C8WLu-6JIB{GozIBar&i-l)A|xWq59>Bn6SRCApuh@}`Jp49a3q7DHC8RK&t1 zDV|F8oUw_;z|6h48H0XirJ(*s>nl%b3AblChADC=$vDkTosK)wjoKP IMT5`(0N8AYIsgCw diff --git a/push_swap.h b/push_swap.h deleted file mode 100644 index e2cc35d..0000000 --- a/push_swap.h +++ /dev/null @@ -1,23 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* push_swap.h :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: user42 +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2021/05/29 11:08:23 by user42 #+# #+# */ -/* Updated: 2021/06/02 13:58:08 by user42 ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#ifndef PUSH_SWAP_H -# define PUSH_SWAP_H -# define SUCCESS 1 -# define ERROR 0 -# include -# include -# include -# include -# include -# include -#endif diff --git a/push_swap/Makefile b/push_swap/Makefile new file mode 100644 index 0000000..cab95f2 --- /dev/null +++ b/push_swap/Makefile @@ -0,0 +1,71 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# Makefile :+: :+: :+: # +# +:+ +:+ +:+ # +# By: mahautlatinis +#+ +:+ +#+ */ +/* By: mahautlatinis b, 0, mem); else if (!ft_strcmp(action, "rrr")) rrr(mem->a, mem->b, 0, mem); - else if (!ft_strcmp(action, "sa")) + else if (!ft_strcmp(action, "sa")) sa(mem->a, 0, mem); else if (!ft_strcmp(action, "sb")) sb(mem->b, 0, mem); diff --git a/srcs/common/.DS_Store b/push_swap/srcs/common/.DS_Store similarity index 100% rename from srcs/common/.DS_Store rename to push_swap/srcs/common/.DS_Store diff --git a/srcs/common/actions/push_stack.c b/push_swap/srcs/common/actions/push_stack.c similarity index 100% rename from srcs/common/actions/push_stack.c rename to push_swap/srcs/common/actions/push_stack.c diff --git a/srcs/common/actions/reverse_rotate_stack.c b/push_swap/srcs/common/actions/reverse_rotate_stack.c similarity index 100% rename from srcs/common/actions/reverse_rotate_stack.c rename to push_swap/srcs/common/actions/reverse_rotate_stack.c diff --git a/srcs/common/actions/rotate_stack.c b/push_swap/srcs/common/actions/rotate_stack.c similarity index 100% rename from srcs/common/actions/rotate_stack.c rename to push_swap/srcs/common/actions/rotate_stack.c diff --git a/srcs/common/actions/swap_stack.c b/push_swap/srcs/common/actions/swap_stack.c similarity index 100% rename from srcs/common/actions/swap_stack.c rename to push_swap/srcs/common/actions/swap_stack.c diff --git a/srcs/common/exit/exit.c b/push_swap/srcs/common/exit/exit.c similarity index 100% rename from srcs/common/exit/exit.c rename to push_swap/srcs/common/exit/exit.c diff --git a/srcs/common/parsing/parsing_utils.c b/push_swap/srcs/common/parsing/parsing_utils.c similarity index 100% rename from srcs/common/parsing/parsing_utils.c rename to push_swap/srcs/common/parsing/parsing_utils.c diff --git a/srcs/common/stack/stack_utils0.c b/push_swap/srcs/common/stack/stack_utils0.c similarity index 100% rename from srcs/common/stack/stack_utils0.c rename to push_swap/srcs/common/stack/stack_utils0.c diff --git a/srcs/common/stack/stack_utils1.c b/push_swap/srcs/common/stack/stack_utils1.c similarity index 100% rename from srcs/common/stack/stack_utils1.c rename to push_swap/srcs/common/stack/stack_utils1.c diff --git a/srcs/common/stack/stack_utils2.c b/push_swap/srcs/common/stack/stack_utils2.c similarity index 100% rename from srcs/common/stack/stack_utils2.c rename to push_swap/srcs/common/stack/stack_utils2.c diff --git a/srcs/common/stack/stack_utils3.c b/push_swap/srcs/common/stack/stack_utils3.c similarity index 100% rename from srcs/common/stack/stack_utils3.c rename to push_swap/srcs/common/stack/stack_utils3.c diff --git a/srcs/common/utils/utils0.c b/push_swap/srcs/common/utils/utils0.c similarity index 100% rename from srcs/common/utils/utils0.c rename to push_swap/srcs/common/utils/utils0.c diff --git a/srcs/include/checker_bonus/checker_bonus.h b/push_swap/srcs/include/checker_bonus/checker_bonus.h similarity index 100% rename from srcs/include/checker_bonus/checker_bonus.h rename to push_swap/srcs/include/checker_bonus/checker_bonus.h diff --git a/srcs/include/common/common.h b/push_swap/srcs/include/common/common.h similarity index 100% rename from srcs/include/common/common.h rename to push_swap/srcs/include/common/common.h diff --git a/srcs/include/sorter/sorter.h b/push_swap/srcs/include/sorter/sorter.h similarity index 100% rename from srcs/include/sorter/sorter.h rename to push_swap/srcs/include/sorter/sorter.h diff --git a/srcs/include/.DS_Store b/push_swap/srcs/sorter/.DS_Store similarity index 78% rename from srcs/include/.DS_Store rename to push_swap/srcs/sorter/.DS_Store index eaba4fbc6abcb2ede104e795b580bb7817a49a5d..733d2da848d50f116f92defcfc3f33ab62d939aa 100644 GIT binary patch delta 352 zcmZoMXfc@JFUrQiz`)4BAi%&7&rr-z%8eeLmopqvNS`n zXHI@{QcivnPz6vYgCh{@{Raaei-CcSA(tT$XjC499z!yk+VyzU<|C`E2Rcj^O)(G9 zjTt}(6#-p|B8C!>A5bl06h~MF^p_aR#D?I_ I>>Pjj0qSi;?EnA( diff --git a/srcs/sorter/long_suites/.DS_Store b/push_swap/srcs/sorter/long_suites/.DS_Store similarity index 100% rename from srcs/sorter/long_suites/.DS_Store rename to push_swap/srcs/sorter/long_suites/.DS_Store diff --git a/srcs/sorter/long_suites/step1_target_index.c b/push_swap/srcs/sorter/long_suites/step1_target_index.c similarity index 100% rename from srcs/sorter/long_suites/step1_target_index.c rename to push_swap/srcs/sorter/long_suites/step1_target_index.c diff --git a/srcs/sorter/long_suites/step2_keep_push.c b/push_swap/srcs/sorter/long_suites/step2_keep_push.c similarity index 76% rename from srcs/sorter/long_suites/step2_keep_push.c rename to push_swap/srcs/sorter/long_suites/step2_keep_push.c index 69208dd..ed9be08 100644 --- a/srcs/sorter/long_suites/step2_keep_push.c +++ b/push_swap/srcs/sorter/long_suites/step2_keep_push.c @@ -1,19 +1,17 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* step2.c :+: :+: :+: */ +/* step2_keep_push.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: malatini +#+ +:+ +#+ */ +/* By: mahautlatinis -/* Compte la plus longue suite de target_index triés dans l'ordre croissant*/ -/* Va renseigner keep a true si bool define est true */ int largest_keep_a(t_s_elem *start, t_stack *stack, bool define) { t_s_elem *elem; @@ -43,7 +41,6 @@ int largest_keep_a(t_s_elem *start, t_stack *stack, bool define) return (count); } -/* Retourne l'adresse du premiere élément de la suite triée à garder sur A */ t_s_elem *get_max_keep(t_stack *stack) { t_s_elem *elem; @@ -58,15 +55,14 @@ t_s_elem *get_max_keep(t_stack *stack) cur = largest_keep_a(elem, stack, false); if (cur > max_keep) { - max_keep = cur; - max = elem; + max_keep = cur; + max = elem; } elem = elem->next; } return (max); } -/* Va determiner la plus longue suite d'index triés et mettre keep a true */ void set_keep(t_mem *mem) { t_s_elem *max; @@ -77,7 +73,6 @@ void set_keep(t_mem *mem) mem->maxsize = largest_keep_a(max, stack, true); } -/* Mets sur la stack B tous ceux dont keep = false */ void push_keep_false_b(t_mem *mem) { int size; diff --git a/srcs/sorter/long_suites/step3_find_shortest_action.c b/push_swap/srcs/sorter/long_suites/step3_find_shortest_action.c similarity index 100% rename from srcs/sorter/long_suites/step3_find_shortest_action.c rename to push_swap/srcs/sorter/long_suites/step3_find_shortest_action.c diff --git a/srcs/sorter/long_suites/step4_sort.c b/push_swap/srcs/sorter/long_suites/step4_sort.c similarity index 100% rename from srcs/sorter/long_suites/step4_sort.c rename to push_swap/srcs/sorter/long_suites/step4_sort.c diff --git a/srcs/sorter/main.c b/push_swap/srcs/sorter/main.c similarity index 100% rename from srcs/sorter/main.c rename to push_swap/srcs/sorter/main.c diff --git a/srcs/sorter/short_suites/short_suites.c b/push_swap/srcs/sorter/short_suites/short_suites.c similarity index 100% rename from srcs/sorter/short_suites/short_suites.c rename to push_swap/srcs/sorter/short_suites/short_suites.c diff --git a/push_swap_visualizer/.clang-format b/push_swap_visualizer/.clang-format deleted file mode 100644 index 33bf2a3..0000000 --- a/push_swap_visualizer/.clang-format +++ /dev/null @@ -1,137 +0,0 @@ ---- -Language: Cpp -# BasedOnStyle: LLVM -AccessModifierOffset: -2 -AlignAfterOpenBracket: Align -AlignConsecutiveMacros: false -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlines: Right -AlignOperands: true -AlignTrailingComments: true -AllowAllArgumentsOnNextLine: true -AllowAllConstructorInitializersOnNextLine: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: Never -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortLambdasOnASingleLine: All -AllowShortIfStatementsOnASingleLine: Never -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: MultiLine -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterCaseLabel: false - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach -BreakBeforeInheritanceComma: false -BreakInheritanceList: BeforeColon -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakConstructorInitializers: BeforeColon -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: true -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DeriveLineEnding: true -DerivePointerAlignment: false -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -FixNamespaceComments: true -ForEachMacros: - - foreach - - Q_FOREACH - - BOOST_FOREACH -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - SortPriority: 0 - - Regex: '^(<|"(gtest|gmock|isl|json)/)' - Priority: 3 - SortPriority: 0 - - Regex: '.*' - Priority: 1 - SortPriority: 0 -IncludeIsMainRegex: '(Test)?$' -IncludeIsMainSourceRegex: '' -IndentCaseLabels: false -IndentGotoLabels: true -IndentPPDirectives: None -IndentWidth: 2 -IndentWrappedFunctionNames: false -JavaScriptQuotes: Leave -JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: true -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBinPackProtocolList: Auto -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: true -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Right -ReflowComments: true -SortIncludes: true -SortUsingDeclarations: true -SpaceAfterCStyleCast: false -SpaceAfterLogicalNot: false -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: true -SpaceBeforeInheritanceColon: true -SpaceBeforeParens: ControlStatements -SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyBlock: false -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInConditionalStatement: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -SpaceBeforeSquareBrackets: false -Standard: Latest -StatementMacros: - - Q_UNUSED - - QT_REQUIRE_VERSION -TabWidth: 8 -UseCRLF: false -UseTab: Never -... - diff --git a/push_swap_visualizer/.gitignore b/push_swap_visualizer/.gitignore deleted file mode 100644 index 04fd5e6..0000000 --- a/push_swap_visualizer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -__pycache__ -build/ -.vscode/ diff --git a/push_swap_visualizer/CMakeLists.txt b/push_swap_visualizer/CMakeLists.txt deleted file mode 100644 index 663fbb1..0000000 --- a/push_swap_visualizer/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 3.16) -project(push_swap_visualizer - LANGUAGES CXX - VERSION 1.0 -) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - -add_subdirectory(dependencies) -add_subdirectory(src) -add_subdirectory(tests) - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/imgui.ini ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/imgui.ini COPYONLY) diff --git a/push_swap_visualizer/LICENSE b/push_swap_visualizer/LICENSE deleted file mode 100644 index 94a9ed0..0000000 --- a/push_swap_visualizer/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/push_swap_visualizer/README.md b/push_swap_visualizer/README.md deleted file mode 100644 index ed725d5..0000000 --- a/push_swap_visualizer/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Push Swap Visualizer -This project is a visualizer for the **"PUSH_SWAP"** 42 School Project. - -**Push Swap** is a program that takes as argument a space separated list of numbers and outputs a list of commands that can be used to sort them. - -You can read the subject [here](https://github.com/Binary-Hackers/42_Subjects/blob/master/00_Projects/02_Algorithmic/push_swap.pdf). - -## Usage -- In the **Values** window - - Choose the size of the push swap input with the slider [Optional] - - **Shuffle** the input [Optional] - - The space separated values should be filled automatically, you can also put your own values - - Set the Push Swap program path (Absolute or relative path). - - **Compute** the sort commands, it will display OK when done. -- In the **Controls** window - - **Load** the commands in the visualizer - - **Start** the animation - - Adjust the **Speed** as needed - - **Pause** and go **Step** by step to see the details of your algorithm. - - **Load** to restart the animation - -## Install -This project uses C++17, cmake, SFML and ImGui. -- Install a C++ compiler (gcc, clang,...) -- Install cmake -- create a 'build' subfolder -- cd in the build folder and type : - - 'cmake ..' - - 'make .' -- run the visualizer with ./bin/visualizer - -![](https://i.imgur.com/zqcsZfY.png) diff --git a/push_swap_visualizer/dependencies/CMakeLists.txt b/push_swap_visualizer/dependencies/CMakeLists.txt deleted file mode 100644 index 17c0ab5..0000000 --- a/push_swap_visualizer/dependencies/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -include(FetchContent) - -FetchContent_Declare( - sfml - URL https://github.com/SFML/SFML/releases/download/2.5.1/SFML-2.5.1-sources.zip -) - -FetchContent_Declare( - imgui - GIT_REPOSITORY https://github.com/ocornut/imgui - GIT_TAG 35b1148efb839381b84de9290d9caf0b66ad7d03 -) - -FetchContent_MakeAvailable(imgui) - -FetchContent_Declare( - imgui-sfml - GIT_REPOSITORY https://github.com/eliasdaler/imgui-sfml - GIT_TAG 82dc2033e51b8323857c3ae1cf1f458b3a933c35 -) - -add_subdirectory(imgui-sfml) -add_subdirectory(sfml) - -FetchContent_Declare( - catch2 - GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v2.13.7 -) - -add_subdirectory(catch2) diff --git a/push_swap_visualizer/dependencies/catch2/CMakeLists.txt b/push_swap_visualizer/dependencies/catch2/CMakeLists.txt deleted file mode 100644 index 9eddf24..0000000 --- a/push_swap_visualizer/dependencies/catch2/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -message(STATUS "Fetching Catch2...") - -FetchContent_MakeAvailable(catch2) -list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/contrib) diff --git a/push_swap_visualizer/dependencies/imgui-sfml/CMakeLists.txt b/push_swap_visualizer/dependencies/imgui-sfml/CMakeLists.txt deleted file mode 100644 index 9b8f449..0000000 --- a/push_swap_visualizer/dependencies/imgui-sfml/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -message(STATUS "Fetching ImGui-SFML...") - -set(IMGUI_DIR ${imgui_SOURCE_DIR}) -set(IMGUI_SFML_FIND_SFML OFF) -set(IMGUI_SFML_IMGUI_DEMO OFF) - -FetchContent_MakeAvailable(imgui-sfml) diff --git a/push_swap_visualizer/dependencies/sfml/CMakeLists.txt b/push_swap_visualizer/dependencies/sfml/CMakeLists.txt deleted file mode 100644 index a09f298..0000000 --- a/push_swap_visualizer/dependencies/sfml/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -message(STATUS "Fetching SFML...") - -# No need to build audio and network modules -set(SFML_BUILD_AUDIO FALSE) -set(SFML_BUILD_NETWORK FALSE) - -FetchContent_MakeAvailable(sfml) diff --git a/push_swap_visualizer/imgui.ini b/push_swap_visualizer/imgui.ini deleted file mode 100644 index 941895e..0000000 --- a/push_swap_visualizer/imgui.ini +++ /dev/null @@ -1,19 +0,0 @@ -[Window][Debug##Default] -Pos=60,60 -Size=400,400 -Collapsed=0 - -[Window][Controls] -Pos=975,47 -Size=205,101 -Collapsed=0 - -[Window][Commands] -Pos=1060,459 -Size=167,320 -Collapsed=0 - -[Window][Values] -Pos=1212,140 -Size=182,207 -Collapsed=0 diff --git a/push_swap_visualizer/include/gui.h b/push_swap_visualizer/include/gui.h deleted file mode 100644 index 6bb5b43..0000000 --- a/push_swap_visualizer/include/gui.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include "pushswap.h" -#include "queues.h" -#include -#include -#include -#include -#include - -class Gui { -private: - enum class STATE {Running, Reverse, Stopped}; - Queues queues; - PushSwap pushswap; - - std::vector barsA; - std::vector barsB; - int generateNumberSize; - std::string numbers; - int speed; - STATE state; - float scale; - - void _updateControls(); - void _drawBars(); - void _animateQueue(sf::Clock &clock); - std::list _generateValues(const unsigned int size); - void _updateBars(); - sf::Color _rgb(const double ratio); - -public: - sf::RenderWindow _window; - - Gui(); - ~Gui(); - - void loop(); -}; diff --git a/push_swap_visualizer/include/pushswap.h b/push_swap_visualizer/include/pushswap.h deleted file mode 100644 index 987f052..0000000 --- a/push_swap_visualizer/include/pushswap.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#include -#include - -class PushSwap { -private: - std::list _split(const std::string &input, const char delimitor); - -public: - PushSwap(); - ~PushSwap(); - void run(const std::string &numbers); - - std::string path; - std::list commands; -}; diff --git a/push_swap_visualizer/include/queues.h b/push_swap_visualizer/include/queues.h deleted file mode 100644 index 75f6bb6..0000000 --- a/push_swap_visualizer/include/queues.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include -#include - -class Queues { - enum COMMAND { NONE, SA, SB, SS, PA, PB, RA, RB, RR, RRA, RRB, RRR }; - std::map commandMap; - -public: - Queues(); - ~Queues(); - - void step(); - void stepBack(); - void start(const std::list &start); - - std::list commands; - std::list executedCommands; - std::list queueA; - std::list queueB; - -private: - void _executeCommand(const std::string &cmd); - void _executeReverseCommand(const std::string &cmd); - std::list _normalize(const std::list &numbers); - void _sa(); - void _sb(); - void _ss(); - void _pa(); - void _pb(); - void _ra(); - void _rb(); - void _rr(); - void _rra(); - void _rrb(); - void _rrr(); -}; diff --git a/push_swap_visualizer/include/utils.h b/push_swap_visualizer/include/utils.h deleted file mode 100644 index e2194d3..0000000 --- a/push_swap_visualizer/include/utils.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include -#include - -namespace Utils { -std::list SplitStringToString(const std::string &s, - const char delimitor); -std::list SplitStringToInt(const std::string &s, - const char delimitor); - -} // namespace Utils diff --git a/push_swap_visualizer/push_swap b/push_swap_visualizer/push_swap deleted file mode 100755 index dae3bc84f82b7079c8cbbd12a4d9fb4172795b9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50968 zcmeHwdtg-6@&DZfA!1|$f{jns3Q9yEs92~$17vkkz^FuN)vkFgB$AiOT?v!`HBecX zv}k?cqiWT*YHh{V^0ihWJS35#-=L_mqDC9rjhkv}X^on)zt7B>bNAlOuG(Lv-+$QF zJ@?McnKNh3oH=vmoDD0zbIwn5xeWbDH_kQaZGD!4>F6U(Xq zAq_*98gI3?iqVFVP?nEUa9!H#ktmTLD}3aa&Qj~8R{F2&(JR&KlX`tpPnVsd2wiG@ zl1}Kq9l|fMEC7x^x+Gfq6uxJc(R0@-eBslzioWAzKMfQ4VY?!kYF zpVI*NdLj_-q@xkWFry?#Ay3jYfrbjx2-MZp)ERz%skyW^;9nFl{Z%FY(qNsxs<^?Z zDz2=oDJ5(}v43Gjb#Z0IvH)H&!lnLtv$zh_#TC`YlDY~rU@WW)1PnsaSf6cNFlYA6 zS^hI7o-uKX;h#N!uD>i$7g$tLZwBh-&z)6SQyrLJTvAEw7FE?$3p>9eO-cy4Y3$SZ zf2yQ!(i44L_}}FywfzQf`n}_E1t+~~ zn``x1p2s1r|7hm&XH&8LH&m4vB9Jm+H=+5D>PWR|l#CW@up#K)rPq~zeoCCg4 zuW#!I=lQnwrTbhveR~d=Bf;PmVUQ8)T*&R{`m3fNgL+1AQjxD|`X*2rzR-JSrY}7G zQ@lhbpi7Z*eC<5!Z+LfIt?TKs`@29Ep$-)9@r4>At=|14pD*l<_`=3!eh#%prXFn= zYg&Rqf%`(s|^BfTmGoxdbL)n*lsA;1q9ix8f$*y;f@T4q6J6lCE>_+ ziNY5y%m{nCMDV6ah7Y;~zPHueM?LEfK{&3-M6;5H?_d%AZt^E%-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q6Y8%L0$pl(H5>h|%O5Ay*Lfvf?kUqXRjJ$8&<7Lh>-!hF zJX{k>Nn>UIJc1YMzaBqhm0+dpl2=`5x%E5Qr@emHDuvNyKN+{}li2UUD- z@X_|E+tuCL034C%`ubiqkR7vX):/W4 /WX> -$<$>:-Wall -Wextra -Wpedantic -Werror> -) - -add_executable(visualizer main.cpp) -target_compile_features(visualizer PRIVATE cxx_std_17) -target_link_libraries(visualizer PRIVATE VisualizerLib) diff --git a/push_swap_visualizer/src/gui.cpp b/push_swap_visualizer/src/gui.cpp deleted file mode 100644 index e24710f..0000000 --- a/push_swap_visualizer/src/gui.cpp +++ /dev/null @@ -1,239 +0,0 @@ -#include "gui.h" -#include "utils.h" -#include -#include -#include -#include -#include -#include - -Gui::Gui() - : generateNumberSize{0}, speed{1}, state{STATE::Stopped}, scale{1.0f}, - _window{sf::VideoMode::getDesktopMode(), "Push Swap Visualizer"} { - _window.setFramerateLimit(60); -} -Gui::~Gui() {} - -std::list Gui::_generateValues(const unsigned int size) { - std::vector values; - for (unsigned int v = 1; v <= size; ++v) { - values.push_back(v); - } - std::shuffle(values.begin(), values.end(), - std::mt19937{std::random_device{}()}); - std::list shuffledList; - std::move(values.begin(), values.end(), back_inserter(shuffledList)); - return shuffledList; -} - -void Gui::_updateBars() { - this->barsA.clear(); - this->barsB.clear(); - const sf::Vector2f windowSize = this->_window.getDefaultView().getSize(); - const uint64_t queuesSize{this->queues.queueA.size() + - this->queues.queueB.size()}; - if (queuesSize == 0) { - return; - } - const float barWidth = static_cast(windowSize.y) / queuesSize; - const float barUnit = static_cast(windowSize.x) / (2 * queuesSize + 2); - - const auto updateBar = [=](std::list queue, - std::vector &bar, - int deltaX = 0) { - int index{0}; - for (const int val : queue) { - bar.push_back( - sf::RectangleShape(sf::Vector2f((1 + val) * barUnit, barWidth))); - bar.back().setPosition(deltaX, index * barWidth); - bar.back().setFillColor(this->_rgb(static_cast(val) / queuesSize)); - index++; - } - }; - - updateBar(this->queues.queueA, this->barsA); - updateBar(this->queues.queueB, this->barsB, windowSize.x / 2); -} - -void Gui::_updateControls() { - ImGui::Begin("Controls"); - ImGui::SliderInt("Speed", &this->speed, 1, 240, "%i/s"); - - if (ImGui::Button("Load")) { - this->state = STATE::Stopped; - this->queues.start(Utils::SplitStringToInt(this->numbers, ' ')); - this->queues.commands = this->pushswap.commands; - } - - ImGui::SameLine(); - if (ImGui::Button("Start")) { - this->state = STATE::Running; - } - - ImGui::SameLine(); - if (ImGui::Button("Reverse")) { - this->state = STATE::Reverse; - } - - ImGui::SameLine(); - if (ImGui::Button("Pause")) { - this->state = STATE::Stopped; - } - - ImGui::SameLine(); - if (ImGui::Button("Step")) { - this->state = STATE::Stopped; - this->queues.step(); - } - - ImGui::SameLine(); - if (ImGui::Button("Step Back")) { - this->state = STATE::Stopped; - this->queues.stepBack(); - } - - ImGui::SliderFloat("Scale UI", &this->scale, 0.5f, 3.0f, "%.2f"); - ImGui::End(); - - ImGui::Begin("Values"); - ImGui::Text("Values to generate"); - ImGui::InputInt("Count", &this->generateNumberSize); - if (this->generateNumberSize < 0) { - this->generateNumberSize = 0; - } - - if (ImGui::Button("Shuffle")) { - unsigned int size = static_cast(this->generateNumberSize); - std::list valueInts = this->_generateValues(size); - std::string values; - for (const int value : valueInts) { - values += std::to_string(value) + ' '; - } - this->numbers = values; - } - - ImGui::Text("Space separated values"); - ImGui::InputText("Values", &this->numbers); - - ImGui::Text("push_swap file path"); - ImGui::InputText("", &this->pushswap.path); - if (ImGui::Button("Compute")) { - this->pushswap.run(this->numbers); - } - - std::string status{"..."}; - if (!this->pushswap.commands.empty()) { - status = "OK"; - } - ImGui::SameLine(); - ImGui::Text("%s", status.c_str()); - - ImGui::End(); - - ImGui::Begin("Commands"); - ImGui::Text("Count: %zu", this->pushswap.commands.size()); - ImGui::BeginChild("Scrolling"); - for (const auto &cmd : this->queues.commands) { - ImGui::Text("%s", cmd.c_str()); - } - ImGui::EndChild(); - ImGui::End(); -} - -void Gui::_drawBars() { - for (const auto &shape : this->barsA) { - this->_window.draw(shape); - } - for (const auto &shape : this->barsB) { - this->_window.draw(shape); - } -} - -void Gui::_animateQueue(sf::Clock &clock) { - float delta = clock.getElapsedTime().asSeconds(); - if (delta >= (1.0 / this->speed)) { - clock.restart(); - } - switch (this->state) { - case STATE::Running: { - int steps = static_cast(delta * this->speed); - for (int i = 0; i < steps; ++i) { - this->queues.step(); - } - break; - } - case STATE::Reverse: { - int steps = static_cast(delta * this->speed); - for (int i = 0; i < steps; ++i) { - this->queues.stepBack(); - } - break; - } - case STATE::Stopped: - break; - } -} - -void Gui::loop() { - ImGui::SFML::Init(_window); - - sf::Clock deltaClock; - sf::Clock stepClock; - while (_window.isOpen()) { - sf::Event event; - while (_window.pollEvent(event)) { - ImGui::SFML::ProcessEvent(event); - - if (event.type == sf::Event::Closed) { - _window.close(); - } - } - ImGui::GetIO().FontGlobalScale = this->scale; - this->_updateBars(); - ImGui::SFML::Update(this->_window, deltaClock.restart()); - - this->_updateControls(); - - this->_animateQueue(stepClock); - - _window.clear(); - - this->_drawBars(); - - ImGui::SFML::Render(_window); - _window.display(); - } - ImGui::SFML::Shutdown(); -} - -sf::Color Gui::_rgb(const double ratio) { - int normalized = static_cast(ratio * 256 * 4); - int region = normalized / 256; - int x = normalized % 256; - - sf::Color color; - color.a = 255; - switch (region) { - case 0: - color.r = 0; - color.g = x; - color.b = 255; - break; - case 1: - color.r = 0; - color.g = 255; - color.b = 255 - x; - break; - case 2: - color.r = x; - color.g = 255; - color.b = 0; - break; - case 3: - color.r = 255; - color.g = 255 - x; - color.b = 0; - break; - } - return color; -} diff --git a/push_swap_visualizer/src/main.cpp b/push_swap_visualizer/src/main.cpp deleted file mode 100644 index 08f5788..0000000 --- a/push_swap_visualizer/src/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "gui.h" - -int main() { - Gui gui; - gui.loop(); - return 0; -} diff --git a/push_swap_visualizer/src/pushswap.cpp b/push_swap_visualizer/src/pushswap.cpp deleted file mode 100644 index 6b10e1e..0000000 --- a/push_swap_visualizer/src/pushswap.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "pushswap.h" -#include "utils.h" -#include -#include -#include -#include -#include - -PushSwap::PushSwap() : path{"./push_swap"} {} -PushSwap::~PushSwap() {} - -void PushSwap::run(const std::string &numbers) { - this->commands.clear(); - std::array buffer; - std::string result; - std::string command = this->path + " " + numbers; - std::unique_ptr pipe(popen(command.c_str(), "r"), - pclose); - - if (!pipe) { - throw std::runtime_error("popen() failed!"); - } - while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { - result += buffer.data(); - } - this->commands = Utils::SplitStringToString(result, '\n'); -} diff --git a/push_swap_visualizer/src/queues.cpp b/push_swap_visualizer/src/queues.cpp deleted file mode 100644 index 9da5b00..0000000 --- a/push_swap_visualizer/src/queues.cpp +++ /dev/null @@ -1,221 +0,0 @@ -#include "queues.h" -#include -#include -#include - -Queues::Queues() - : commandMap{ - {"sa", COMMAND::SA}, {"sb", COMMAND::SB}, {"ss", COMMAND::SS}, - {"pa", COMMAND::PA}, {"pb", COMMAND::PB}, {"ra", COMMAND::RA}, - {"rb", COMMAND::RB}, {"rr", COMMAND::RR}, {"rra", COMMAND::RRA}, - {"rrb", COMMAND::RRB}, {"rrr", COMMAND::RRR}, - } {} -Queues::~Queues() {} - -void Queues::step() { - if (this->commands.empty()) { - return; - } - this->_executeCommand(this->commands.front()); - this->executedCommands.push_front(this->commands.front()); - this->commands.pop_front(); -} - -void Queues::stepBack() { - if (this->executedCommands.empty()) { - return; - } - this->_executeReverseCommand(this->executedCommands.front()); - this->commands.push_front(this->executedCommands.front()); - this->executedCommands.pop_front(); -} - -std::list Queues::_normalize(const std::list &numbers) { - std::list normalized{numbers}; - std::vector ordered(numbers.size()); - std::copy(numbers.begin(), numbers.end(), ordered.begin()); - std::sort(ordered.begin(), ordered.end()); - for (int &number : normalized) { - const auto order = std::find(ordered.begin(), ordered.end(), number); - number = order - ordered.begin(); - } - return normalized; -} - -void Queues::start(const std::list &start) { - this->queueA = this->_normalize(start); - this->queueB.clear(); -} - -void Queues::_executeCommand(const std::string &cmd) { - COMMAND command{COMMAND::NONE}; - try { - command = this->commandMap[cmd]; - } catch (...) { - } - switch (command) { - case COMMAND::SA: - this->_sa(); - break; - case COMMAND::SB: - this->_sb(); - break; - case COMMAND::SS: - this->_ss(); - break; - case COMMAND::PA: - this->_pa(); - break; - case COMMAND::PB: - this->_pb(); - break; - case COMMAND::RA: - this->_ra(); - break; - case COMMAND::RB: - this->_rb(); - break; - case COMMAND::RR: - this->_rr(); - break; - case COMMAND::RRA: - this->_rra(); - break; - case COMMAND::RRB: - this->_rrb(); - break; - case COMMAND::RRR: - this->_rrr(); - break; - default: - break; - } -} - -void Queues::_executeReverseCommand(const std::string &cmd) { - COMMAND command{COMMAND::NONE}; - try { - command = this->commandMap[cmd]; - } catch (...) { - } - switch (command) { - case COMMAND::SA: - this->_sa(); - break; - case COMMAND::SB: - this->_sb(); - break; - case COMMAND::SS: - this->_ss(); - break; - case COMMAND::PA: - this->_pb(); - break; - case COMMAND::PB: - this->_pa(); - break; - case COMMAND::RA: - this->_rra(); - break; - case COMMAND::RB: - this->_rrb(); - break; - case COMMAND::RR: - this->_rrr(); - break; - case COMMAND::RRA: - this->_ra(); - break; - case COMMAND::RRB: - this->_rb(); - break; - case COMMAND::RRR: - this->_rr(); - break; - default: - break; - } -} - -void Queues::_sa() { - if (this->queueA.size() < 2) { - return; - } - std::swap(*this->queueA.begin(), *(++this->queueA.begin())); -} - -void Queues::_sb() { - if (this->queueB.size() < 2) { - return; - } - std::swap(*this->queueB.begin(), *(++this->queueB.begin())); -} - -void Queues::_ss() { - this->_sa(); - this->_sb(); -} - -void Queues::_pa() { - if (this->queueB.empty()) { - return; - } - int firstElement = this->queueB.front(); - this->queueB.pop_front(); - this->queueA.push_front(firstElement); -} - -void Queues::_pb() { - if (this->queueA.empty()) { - return; - } - int firstElement = this->queueA.front(); - this->queueA.pop_front(); - this->queueB.push_front(firstElement); -} - -void Queues::_ra() { - if (this->queueA.size() < 2) { - return; - } - int firstElement = this->queueA.front(); - this->queueA.pop_front(); - this->queueA.push_back(firstElement); -} - -void Queues::_rb() { - if (this->queueB.size() < 2) { - return; - } - int firstElement = this->queueB.front(); - this->queueB.pop_front(); - this->queueB.push_back(firstElement); -} - -void Queues::_rr() { - this->_ra(); - this->_rb(); -} - -void Queues::_rra() { - if (this->queueA.size() < 2) { - return; - } - int lastElement = this->queueA.back(); - this->queueA.pop_back(); - this->queueA.push_front(lastElement); -} - -void Queues::_rrb() { - if (this->queueB.size() < 2) { - return; - } - int lastElement = this->queueB.back(); - this->queueB.pop_back(); - this->queueB.push_front(lastElement); -} - -void Queues::_rrr() { - this->_rra(); - this->_rrb(); -} diff --git a/push_swap_visualizer/src/utils.cpp b/push_swap_visualizer/src/utils.cpp deleted file mode 100644 index 55160ed..0000000 --- a/push_swap_visualizer/src/utils.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "utils.h" -#include -#include -#include - -namespace Utils { -std::list SplitStringToString(const std::string &s, - const char delimitor) { - std::stringstream ss(s); - std::string item; - std::list elems; - while (std::getline(ss, item, delimitor)) { - elems.push_back(item); - } - return elems; -} - -std::list SplitStringToInt(const std::string &s, const char delimitor) { - std::stringstream ss(s); - std::string item; - std::list elems; - while (std::getline(ss, item, delimitor)) { - elems.push_back(std::stoi(item)); - } - return elems; -} -} // namespace Utils diff --git a/push_swap_visualizer/tests/CMakeLists.txt b/push_swap_visualizer/tests/CMakeLists.txt deleted file mode 100644 index 3ea33d3..0000000 --- a/push_swap_visualizer/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -add_executable(tests test_queues.cpp test_pushswap.cpp) -target_link_libraries(tests PRIVATE Catch2::Catch2 VisualizerLib) -target_include_directories(tests PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") diff --git a/push_swap_visualizer/tests/test_pushswap.cpp b/push_swap_visualizer/tests/test_pushswap.cpp deleted file mode 100644 index 45bf00f..0000000 --- a/push_swap_visualizer/tests/test_pushswap.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include "pushswap.h" - -TEST_CASE("run", "[PushSwap]") { - PushSwap ps; - ps.path = "../push_swap"; - ps.run("2 1 3"); - REQUIRE_FALSE(ps.commands.empty()); - REQUIRE(ps.commands.front() == "sa"); -} diff --git a/push_swap_visualizer/tests/test_queues.cpp b/push_swap_visualizer/tests/test_queues.cpp deleted file mode 100644 index c65ea06..0000000 --- a/push_swap_visualizer/tests/test_queues.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include -#include "queues.h" - -TEST_CASE("normalize", "[Queues]") { - Queues queues; - queues.start({2, 10, 4}); - auto it = queues.queueA.begin(); - REQUIRE(*it == 0); - REQUIRE(*(++it) == 2); - REQUIRE(*(++it) == 1); -} - -TEST_CASE("sa", "[Queues]") { - Queues queues; - queues.queueA = {1, 2, 3, 4}; - queues.commands = {"sa"}; - queues.step(); - REQUIRE(queues.queueA.front() == 2); - REQUIRE(*(++queues.queueA.begin()) == 1); -} - -TEST_CASE("sb", "[Queues]") { - Queues queues; - queues.queueB = {1, 2, 3, 4}; - queues.commands = {"sb"}; - queues.step(); - REQUIRE(queues.queueB.front() == 2); - REQUIRE(*(++queues.queueB.begin()) == 1); -} - -TEST_CASE("pa", "[Queues]") { - Queues queues; - queues.queueB = {1, 2, 3, 4}; - queues.commands = {"pa"}; - queues.step(); - REQUIRE(queues.queueB.front() == 2); - REQUIRE(queues.queueA.front() == 1); -} - -TEST_CASE("pb", "[Queues]") { - Queues queues; - queues.queueA = {1, 2, 3, 4}; - queues.commands = {"pb"}; - queues.step(); - REQUIRE(queues.queueA.front() == 2); - REQUIRE(queues.queueB.front() == 1); -} - -TEST_CASE("ra", "[Queues]") { - Queues queues; - queues.queueA = {1, 2, 3, 4}; - queues.commands = {"ra"}; - queues.step(); - REQUIRE(queues.queueA.front() == 2); - REQUIRE(queues.queueA.back() == 1); -} - -TEST_CASE("rb", "[Queues]") { - Queues queues; - queues.queueB = {1, 2, 3, 4}; - queues.commands = {"rb"}; - queues.step(); - REQUIRE(queues.queueB.front() == 2); - REQUIRE(queues.queueB.back() == 1); -} - -TEST_CASE("rra", "[Queues]") { - Queues queues; - queues.queueA = {1, 2, 3, 4}; - queues.commands = {"rra"}; - queues.step(); - REQUIRE(queues.queueA.front() == 4); - REQUIRE(queues.queueA.back() == 3); -} - -TEST_CASE("rrb", "[Queues]") { - Queues queues; - queues.queueB = {1, 2, 3, 4}; - queues.commands = {"rrb"}; - queues.step(); - REQUIRE(queues.queueB.front() == 4); - REQUIRE(queues.queueB.back() == 3); -} diff --git a/pyviz.py b/pyviz.py deleted file mode 100644 index b11b530..0000000 --- a/pyviz.py +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/env python3 - - -from tkinter import * -from tkinter import ttk - -import sys -import time -import subprocess -import os -from math import sqrt - - -""" -__project__ = "push_swap visualizer" -__author__ = "Emmanuel Ruaud" -__email__ = "eruaud@student.le-101.fr" -This python script was created to visualize your work with the PUSH_SWAP -42 Project. -You must put this script in the same path or in a sibling path of your program -Of course you need Python3 with the builtin Tkinter. -You can install it with Brew. ---> Brew install python3 -Execute the script with : ---> python3 pyviz.py `ruby -e "puts (-200..200).to_a.shuffle.join(' ')"` -You can change the PUSHS_PATH to get to the relative path of your push_swap -You can decrease or increase the speed with the matching buttons. -""" - - -RELATIVE_PATH = r'push_swap' - - -class PsGui: - def __init__(self, master): - ww = 600 - wh = 600 - self.i = 0 - self.speed = 0 - dirname = os.path.dirname(os.path.abspath(__file__)) - PUSHS_PATH = os.path.join(dirname, RELATIVE_PATH) - self.pile_a = [int(num) for num in sys.argv[1:]] - self.first_pile = self.pile_a[:] - self.pile_b = [] - self.cmds = subprocess.check_output([PUSHS_PATH] + sys.argv[1:], stderr=subprocess.STDOUT, - timeout=12).splitlines() - self.prespeed = 1 / len(self.pile_a) - self.master = master - master.title("Push_swap viewer") - self.mainframe = Frame(master) - self.mainframe.pack(fill=BOTH) - self.can = Canvas(self.mainframe, width=ww, height=wh, bg="black") - self.can.pack(side=LEFT) - self.toolframe = Frame(self.mainframe) - self.toolframe.pack(side=RIGHT, fill=BOTH) - self.butframe = Frame(self.toolframe) - self.butframe.pack(side=TOP, fill=Y) - self.PrevCtl = Button(self.butframe, text="<<", command=self.speed_down) - self.PrevCtl.pack(side=LEFT) - self.PauseCtl = Button(self.butframe, text=">", command=self.pause) - self.PauseCtl.pack(side=LEFT) - self.NextCtl = Button(self.butframe, text=">>", command=self.speed_up) - self.NextCtl.pack(side=LEFT) - self.ResetCtl = Button(self.butframe, text="R", command=self.reset) - self.ResetCtl.pack(side=LEFT) - self.listbox = Listbox(self.toolframe, bg='black', fg='light cyan', - font=("monospace", 12), relief=FLAT) - self.listbox.pack(fill=BOTH, expand=1) - for cmd in self.cmds: - self.listbox.insert(END, cmd) - self.statusframe = Frame(master) - self.statusframe.pack(side=BOTTOM, fill=X) - self.speedmeter = Label(self.statusframe, - text='frame rate = ' + str(self.speed), - font=("monospace", 10)) - self.speedmeter.pack(side=LEFT) - self.totalcount = Label(self.statusframe, - text='- operations = ' + str(len(self.cmds)), - font=("monospace", 10)) - self.totalcount.pack(side=LEFT) - self.draw_rectangles() - self.launch() - - def reset(self): - self.speed = 0 - self.i = 0 - del self.pile_a[:] - self.pile_a = self.first_pile[:] - del self.pile_b[:] - self.can.delete("all") - self.draw_rectangles() - self.listbox.see(0) - self.PauseCtl.config(text='>') - self.launch() - - def pause(self): - if self.speed != 0: - self.prespeed = self.speed - self.speed = 0 - self.speedmeter.config(text='frame rate = 0') - self.PauseCtl.config(text='>') - else: - self.speed = self.prespeed - self.speedmeter.config(text='frame rate = ' \ - + '{:.2e}'.format(self.speed)) - self.PauseCtl.config(text='||') - - def speed_up(self): - if self.speed == 0: - self.PauseCtl.config(text='||') - self.speed = self.prespeed - self.speed = self.speed ** 2 - self.speedmeter.config(text='frame rate = ' \ - + '{:.2e}'.format(self.speed)) - - def speed_down(self): - self.speed = sqrt(self.speed) - self.speedmeter.config(text='frame rate = ' \ - + '{:.2e}'.format(self.speed)) - - def launch_cmds(self, cmd): - if cmd == b'sa' and len(self.pile_a) >= 2: - self.pile_a[0], self.pile_a[1] = self.pile_a[1], self.pile_a[0] - if cmd == b'sb' and len(self.pile_b) >= 2: - self.pile_b[0], self.pile_b[1] = self.pile_b[1], self.pile_b[0] - if cmd == b'ss': - if (len(self.pile_a) >= 2): - self.pile_a[0], self.pile_a[1] = self.pile_a[1], self.pile_a[0] - if (len(self.pile_b) >= 2): - self.pile_b[0], self.pile_b[1] = self.pile_b[1], self.pile_b[0] - if cmd == b'ra' and len(self.pile_a) >= 2: - self.pile_a.append(self.pile_a[0]) - del self.pile_a[0] - if cmd == b'rb' and len(self.pile_b) >= 2: - self.pile_b.append(self.pile_b[0]) - del self.pile_b[0] - if cmd == b'rr': - if (len(self.pile_a) >= 2): - self.pile_a.append(self.pile_a[0]) - del self.pile_a[0] - if (len(self.pile_b) >= 2): - self.pile_b.append(self.pile_b[0]) - del self.pile_b[0] - if cmd == b'rra' and len(self.pile_a) >= 2: - self.pile_a = [self.pile_a[-1]] + self.pile_a - del self.pile_a[-1] - if cmd == b'rrb' and len(self.pile_b) >= 2: - self.pile_b = [self.pile_b[-1]] + self.pile_b - del self.pile_b[-1] - if cmd == b'rrr': - if (len(self.pile_a) >= 2): - self.pile_a = [self.pile_a[-1]] + self.pile_a - del self.pile_a[-1] - if (len(self.pile_b) >= 2): - self.pile_b = [self.pile_b[-1]] + self.pile_b - del self.pile_b[-1] - if cmd == b'pa' and len(self.pile_b) >= 1: - self.pile_a = [self.pile_b[0]] + self.pile_a - del self.pile_b[0] - if cmd == b'pb' and len(self.pile_a) >= 1: - self.pile_b = [self.pile_a[0]] + self.pile_b - del self.pile_a[0] - return self.pile_a, self.pile_b - - def set_color(self, index): - col = '#%02x%02x%02x' % (int(255 * (index - 0.3) * (index > 0.3)), - int(255 * index - - ((510 * (index - 0.6)) * (index > 0.6))), - int((255 - 510 * index) * (index < 0.5))) - return col - - def draw_rectangles(self): - vi = 0 - ww = 600 - wh = 600 - hw = ww / 2 - hm = len(self.pile_a) + len(self.pile_b) - mx = max(self.pile_a + self.pile_b) - mn = min(self.pile_a + self.pile_b) - rects = [] - if len(self.pile_a) > 0: - a_val = [(num - mn) / (mx - mn) for num in self.pile_a] - for vala in a_val: - rects.append(self.can.create_rectangle(0, vi, - 10 + vala * (hw - 100), vi + wh / hm, - fill=self.set_color(vala), outline="")) - vi += wh / hm - vi = 0 - if len(self.pile_b) > 0: - b_val = [(num - mn) / (mx - mn) for num in self.pile_b] - for valb in b_val: - rects.append(self.can.create_rectangle(hw, vi, - hw + 10 + valb * (hw - 100), vi + wh / hm, - fill=self.set_color(valb), outline="")) - vi += wh / hm - - def launch(self): - while self.i < len(self.cmds): - if self.speed != 0: - while self.i < len(self.cmds): - self.listbox.activate(self.i) - self.can.delete("all") - self.pile_a, self.pile_b = \ - self.launch_cmds(self.cmds[self.i]) - self.draw_rectangles() - time.sleep(2 * self.speed) - self.can.update() - self.listbox.yview_scroll(1, 'units') - self.i += 1 - if self.speed == 0: - break - time.sleep(0.25) - self.can.update() - self.PauseCtl.config(text='>') - - -# root = Tk() -# root.resizable(width=False, height=False) -# gui = PsGui(root) -# root.mainloop() - -root = Tk() -frm = ttk.Frame(root, padding=10) -# frm.grid() -gui = PsGui(root) -ttk.Label(frm, text="PushSwap").grid(column=0, row=0) -ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0) -root.mainloop() \ No newline at end of file diff --git a/srcs/.DS_Store b/srcs/.DS_Store deleted file mode 100644 index 194ba1d7cf3b0baec88a2fe1bce9950432593b90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeI1&2G~`5XWcRkUD{i91w(?FGvXG5GOQk4@glchu)Ba-~cGKlZaTj-YRy8zy$d% z_xtQF6FHEVi9z!3N^35ffH zjV83MHB~Ba9q42U04-ox8hq3NGRM~1)|x7nsW_*q9+*yLy2M~A9rLybhqkq*N>w^B zl}=1wndu6J$*UvJmf^(ON=xaX!O!fyuggkrVhXX$C@JTp`(MsaLt4B=wqo zcfUES*~#v%@SCmKtYqD|<=i_wI)42oc{_XeUM`84zQfQ}bv*AstY7e}?l=s1_ySSl z3`OANbc_$DFo&^^`9+MG*adK>=MAo!Bu!_(X1AQ3wdg)#L9mtRK4CJm$Q-OK@+kzc z0DEpg!z?cL9oe@Rc3m!d0od2`26i(^cJ{Ep9LEvBoJIo&d-dhbCWydR68ntF+&Xj2 ziWFgMjVTuI+;YV3AUnIk7Gf_Nua@A|`~$o)L~^tQY-5IiA#g@uQ@K@9|36s${{Jk& zc!q!>@Xrxog@f)v2g~~P%QwG5QES_1M`*%CT&h&2pp)e|RF>n=`5%VxZG?)Pw$@ZB RMquVefW%-rL*TCx_zB$3Sd{<( diff --git a/srcs/common/actions/push_stack.o b/srcs/common/actions/push_stack.o deleted file mode 100644 index c45300f15364b9ea3f630f79d2846ad65c0fbc7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2384 zcmb_eOK4L;6rE_*_)UvdDhft$p^J!$g6Jlql>se?SP)dk7@tirKVM!jDuF_*_y~f6 zI}yZ{YnLKgQBd3%Tm^CQP=pjJbm5}-tLM(#mru<@1TW0Hb3b$Do;%Y?-+ue@Yl#q{ zg#sUpK8)}Je4-eTbr?4&5FqhICa{IpKztjRf(GG{DCJmX$IOj=eE7uiw(ZXzQ6Uh* zqqQl3tR_dF7$@b6QpuuYr*mWMP^ufx#|d-%J=f{4=W=}$^(FJ!LL%v?QtnbZcTTAz z2U|f*Cb_Qr>}�yRZR6cR?y;rPO&lk+sZ%`SqRQ#(0c(V=?2gy&Tkes?|<>hcL`h ztUxjbgf=Dr7Sw??q5)loruk8fPN6z!V5@(YQR#k`)#<2oE3?uq&B$71wn-=tLy-vr zozkC2n917ktgH#?4mVp_)mag_c0dO!GkTr&?C40Z$sxVc4MPE+R8zX-9RUzrZg}e0 ze29sC#$$@npj(4LoAOnhdW8zxh}y2cjGlgRep_VYH8MqHqhP+QQwM05)g<;I(V> zunn z#J6=pyRY$H-Co@ET8VFKWg7Q%hfPbD|O%7I{hg>-*|F}-Ae*eGy zH~nq@LSmUHoTX#vluyPm&qzmLhUf1B;&oo}F(5w4ub&+dk5j84LGeKo7NIN0M5x>! z>R+)Wd<%PShM)dK#=ql&L%4n+_OI%{zTm)0|1G1ugBbFM$zvWp^D@X2KTRI<>6v#2 zX|Fkt>+YHN1bNY41}`Y@F8JdtVz;5usx?=k`(U4f#!p;qJ;w(){vAma{{T(#ebC?< z8-T`38~cLZgrN^ZlRpMc{-x}HfSQ)VzQuZkH9eQ)r+15R$Ds-04C^@SC~GJkzX%;c zqJPd=w*7NG$+mxwRBmWJ*Pqx6@b{xI>>OiQIMtd@IY3Qwv$0%dDj{5465B-fm*E zCAx}ItbmUx=b%r{*g>haxuh4Z)UxRfbnCk&=xyPf28mzdDWWB5x#2q22;7q~3@{wV zG+Zx22Y&PwOAHb7Gzs?`>tz4SRQQ_8 zE;Ps}v6TJ$K7^B~0$dd&zg2GPBv(a9YsCyAj#qsnc&a1by`XR&+FM^~?Id_s7~x5Dl7mC7n? ze+W1#tnA(B?9RsV_?{n&PdT}|ldLIcVy~?co4Satb&0*wO}^)fZMMZ)R%(bWYn~U& z{a7#|_S%a_9{Hy9@Al}||Iv>N<4lkFu*?UZ-lIT16bKCu1~)Ks8TIqvZTv-|dkBnPc2IJa*{eMCTuIkAR!}58NBz@`4lHNBBz6h!0gw7Q0f(M^W0}dp4&!*jm=>JWFRgvDiOi0k02Tz2bbuQv=Gg^Va?6 j`{f(QA1&Si(rZ>aYhrIcF|AcoTPxX=n_Ke?ND=)49-0D2 diff --git a/srcs/common/actions/rotate_stack.o b/srcs/common/actions/rotate_stack.o deleted file mode 100644 index dbb3b4d9c3ca5ec12de2ee229fe7573c6fecf455..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1800 zcmb_c-Afcv6u+yc;@57du|ePp1x6W>6uxEV!hJ|sLZO$qjq8}2t}>3e1Ow7&G%SG+ zz4R9J)V~lxMS;E5V~_I^tY9z?J`7RX@64RL>gq;8hdKA0dw%Eh-kJIQ68`uEUZ6gHD5=5Kx1@P#~y}VnBM2oPwD05h-PxMLX8x{aE(S*#2H?!<>imQEYfZ zh*km{#3~6*O68YqYo>6Y4N4u(r}MNiKC2tyJ(tnx&|iLGe$mL=YPqm7QgbGj~5sT}t+>5hSKIqI#Ya zpjIG~YaLMloZUfGZl~R5HYC@r0S#4(mZe)vBj{v|pvq91`q}dL_V%I{JnAtUqNJ{P za6WH&M|$JPLSwGcNkT2_iLXUjd1BYuNhH@#!St3+RX)Ai4f&dGGCmOuT#{Yx`-CUE zc*1Lu zdjr4JZd{k=JCg4LejNCK`+Fhrbhl!`Tiaj9@+D>^{5d4yE+pXtY(LNTPPX@=Ca8ZE z3rvmoSPrqwu!M+k_=qGHea{zp??V#xfeF|5*vWgsh?2y>^*#1tkL^CGIb+FI=A1ci d7Hpv`3%p<(wyBnEBmY3C6>G*eVVnRP;y3TqKJ5Si diff --git a/srcs/common/actions/swap_stack.o b/srcs/common/actions/swap_stack.o deleted file mode 100644 index 40dd45cf2f21b1a438ee101b6b7edc4336fa6da7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1624 zcmb_b&ubG=5PoT68)9_>rV>RoqGB!u5fnUGX#)>5P^5ug%Ih|!O|*?6*^nXxgR$Zg zg&sV3_M~|9B3`8Eq2j@V|3DCg2od(sLlCTfvpX*)(NqKnX1{s!^P7FUAHIFv85P1e zEbxH(p@AVhqEN^o=zR(dkQfz0VpK!OXY>@L)Q?0dE4^lUws)S5&&~ciYwHuwqJC66 zvqy-%6!eQKffl7wMXQj_Ewe+Z-hR5z7{`N}2%nj*ZU=s;o2z*dJH{ z2*Y7sRdzL2GxyX4r(mb4QM-jNo7=?Fuw+tBM?q>#P<7>;)nl~&*0r}}v``t~lG zK~Y?U7K2FDa@#Zb>(^c(s%%~#5O@9(U*L{+2GobS-goP&@U4Y>p|R1x25L^ie*~KU z{=*gKC&Z=wp?gD9`{*Aap*&op*y23q`NzB!T`^Q{6it)x7{x-Ep8FxBx`z$RuNw5#ahy0}Uip$pJYG zrL(>VnC@A>_oI9UxI#ZOS~l~_B*XMN F`~**z5$6B^ diff --git a/srcs/common/exit/exit.o b/srcs/common/exit/exit.o deleted file mode 100644 index 61a4b9a25f378308818c71f8bd397dc69ee03f0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1400 zcma)5&1(};5PxZF8?<&KsI(w7pn@O^enP!S)GoY(LMaW1AkPq28%@))-Oxo?5Y~!I z6ngdQU*Oq;1r_wBNAZ-4kb*)EJp>Ppzj-?^AB_Qr%=^vP`_1fR_v@eEdlN#WMgifzSWhrLeW>%%0{VjU#Xk(og|C}p6eb5 z1Mm^$7tF`heUwVM%j$twSaFjJ`{#Shd|S--o%z@mhw$jeCcFThh9=jrkx{)BK}{)M z#~kCp+yNoxfVeLfpuIwK8tsk$kDZtCPZ|Bn$T)1tngbOwcA7E@o5Ff_5fmm`lhfLa z)3O#e8$>QYJ57ziShIcoJPzJ%+Pr*q`841iZN4*! ztW_~;zODn?^oME7@w`>)Cmz2I-P9VJ;gG!ECvuBJ@<;i8>dB%=1({T4aw5Hj zE~gMb0X?^e{X@9F5Z9(M&qrxknU*YP|9byv|F@1A`Lh@X8D z2VPZs28c}_+W`mVe*p0++wU3QFun$&&VI>whvQcmb3jmyXBh$7r|;iF!t85`eY0Qs wb|`Oz%pO;q-RIL@dh+?o_Z>gij7{9lN7wC6V%m4m))XA7} zhGBuWL$}H4fkLiA2PtkL(^LrA*BB>8Pe!WKOv-p*IZj9=QjVLG<4#n!b8X6}e#B+) ztm=bcwT@!wHxpTi`e))YvG^jqI4k9&(Z+mK_nFq40?mj^6#Xz9?c!ru_FJ@b%GDbpu|kCkQ2!>QdM_ogUd z^?v=wwfFv0+vgN>Z>?TfKZXTJ2|IBh_RJFXg)M4ZdqRi{wK!u|MCNgc@3>v>4C|L~ z&CK)EC8{{iw7aZIFW<}}^~%g|89a?)vhwpL(2%Qkj#XhiO+yw|vS{#i)hT(fL)RY2 z+8>1dMG( zaKQ%dsXofgnT0M)1(TU53Hz(CK7mMrhIGLy_lud&!pMPHp}gI|hVRgzKxnj8^YpEz z48ePxVV^#tg5Ym44C~|Y)Gli4@<6#Ko~-k>@3hEo=oa5p<%xQFxFp8P6J{)X43E3h zwE@%(>|KX?{@}(CeLiC&=RGgm?ss=k5rlAb|3Qt@JWj>U12?8|n$HQ`Bz|Q4o4%W{ zpyA75A^RQ+?QiP%u8!TX5Z^EsxE(#(!qj3fELRxXqP<$|%#H3(d1p@D8Uv$52IDfk hG#h>vjx!mE#Ue2#qlu-E^v5G%rn3I|XvnYNe*wk+H2?qr diff --git a/srcs/common/stack/stack_utils0.o b/srcs/common/stack/stack_utils0.o deleted file mode 100644 index 31b3ccd4cfe1bae924eaaa02c6a9b880333c0528..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1952 zcmb7EPly{;7=P1Nn`-SWV#_MZ&SAk*>ehoSSRrB`JfsUET@cFhnr5d>Xp#-dgl>zW zk%`iASS+-6bJUAR@u1z5Et^sh4_+!BI)@b}kiwiwENSEKoA+inT{ee)=~c$^+7+|+@js2F#&Q^7ED$9ndj)l1 z53?|&COFBTVT}{jNej>yrbXfXBfLf=d>#pRo|#`CLX1s5GJ2Q<3G7=wnl;RyJ4+kp z4BN)LjR;^Ww#$cCWw?Bs&0#%QMw-|2n zhXz5K7-#E8#CZ&Z+4@qY8JM@3JFv`FG1jrouSZE|f%vKsU?A7b?~afg8d%d@JF39Z zZ7Tjm$GaoE`#U}O^T-!?o5Ekzp?n_tDff;+g*UcsN$y*nS>rl?sQTy_G}7LuNE^Rs zbT&t4-9)DC`Fo9F(q5MbR796=5de8V;!*X`@f&y&*+GMP4HX# z^*1N@<7)z+arJX%tWFtIhYzN1Am%J=Z)3HGXc(mHXYAu6Q{U|S@?QtXmm~cjg5Xn?z7L)PryRt8(!2>yTh3{o(cID;EcSl@ZUWdQ11N(&f}iH6njdvlk8Nk~?b69N?yv3A>6<(5FYMBpv{wrbla+ccFSFH)H72We zc3F$Lyq&uwm+O^cA(wS*IPGe6rOITXTySK`Ef)Rvz@X)JzDfE)kF6^O#6oq<_mnGR?Ffk$7&`=Nx@uOi8 zJbLWWpWsOZ3m)yU$6N~8gP@Q@5HWpb-`TiQLI-B&<9X&|hxhva<}pcRj1WH1QRo>v z^H9hv^bN;Dw0)~* z`((GQHr%$|Y@{i*x1kZFGHE~^ySdvzdQsBg`zxKdMrwZw8QbmsFl#d9Ge57P5}#s#?h@7D*Lq Qs#dOgZcf!aC%a950nBHp1poj5 diff --git a/srcs/common/stack/stack_utils2.o b/srcs/common/stack/stack_utils2.o deleted file mode 100644 index 704120f3f23e9a058ba13a95ca9c8643ebb6aaba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2120 zcmbtUO=uHQ5T4Z9`o9qrs|W`1VkM=Bir~Tev#^4QNDD=%&)9C;V49XR!6F2LvC0w@ z4|)(U^(J1uiYN-^Ab67sJ>(*EAwn=c1gTxWc{^Lz*ofee_vX#aH{Y9?-R#HjUspPb zBI^hnRy)>U8@3o0WH;742UrZrvj@$lu9MDb|#TJ;(L_(oo`8aq&!NY5OL`Q?l&x}e8+unGhaiJH%QVH z_`)2)Jprdu!;=$JiQ%lurEetDBTAh=8^pAhmG@ z&I6Y7#VS@~mXmKdxh2aPShR}y1{t%==)S;amGX^JZfTKeiiq6Sk;i{TBF5}#I9vitl=PI0YoG&Igr-8smt| zWriBV5e+zIRhl~Jho!0e8&^$+02|cfe$dxe9do&9xZ&sXzxUt!=lfA76;AR_R1ro!N@djuyu82d^PG>0?b?3b^PGeoH)0`dJhA5V*47r0z9wFM*4# z_;o_q49T&4~V}E4)hX#3JqNR4m3U@aV541-46SZ*ac{$c3c(R zCpsn?O2_#-Y5>TjEIemzYl~>V*cGuE%JG8WPlz4k0EGW6a@6*@COh6_lbW7Lq*C^D zmejT6*qDFFB-3LmJBi;EspPbpO#8>_Y-0GjO4;eL>^P|#<95bY6UmX0luas=NnlIp HTZw)GX|uCZ diff --git a/srcs/common/stack/stack_utils3.o b/srcs/common/stack/stack_utils3.o deleted file mode 100644 index f4b37213a2d5df33bb5473f41993926d8f81426e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1176 zcmah|L2J}d5PqqpU9oL)P*_1QpkRx5sCX#!(qhwnf`Ui|FXc6+kzL$w!#1m>5GZV0 z2#e68f5DR;JxQg)f)_pZ*o%+_g*^r--F~xgQg^MzA@gRwneWZ}UP!+E{&hSogmFP& zfe*qzQewklSK(8H&$00V-8f)QhA~r+(_Av8LVrEfxyB35vxPr6%kJ?Unnzk_>6Qk? zX2zkYl()JPxL&AgmDi=pvQiJ{di$B?B`#VJLRxZ|$C_BVCMe|>)r+dT;%B&D-&@wT z%ku)B$531nqL}3r@51wNy=?@C!eMkM)otj&BbKmCA!5IH4DU74NzO<2w*H$xmGKW* z|7puON@c@=3wmOw-G>rcj}l>S1sK@ZXrs|aV_rAfwEa;sZJ66PxFV;W#N4{lMN#^R zL{9F-pJn_tK}yqb)J&d^Y`yPvIw&MuNLt%esDH5+_s#2@L?^wFT8~m;z8OVfa__d2 z#?Db|2mlvA+Hj8g_%cpqTuYk;izYM+mnlFdF8d%S8y974%4Q*_n>TeB*CCJd&1S*Y z=o*E^eOfbnr;{_U{sR*x&gma=pFiz0`@0&!F*cqEW8E^Wk>T7fSR{{R$YUsj@%ci` zj#)bc_ebe1kP&YV{+)TO+S`*4E`rb>mTnox2&kcQ4{AzWzDwO+tO}%o+L^w1_nlE1|R{%EI_;i#83cYAdm!N3lJX%;DE~AfYLBN&`bsp2AK;2@$n_8 z6(tZhgdgG>5rW{uSTRrr$UKl+;DCjp0nP?8;^UL^a|;raOX5rO$}{s);^Tc>kmVDg z90w?E!31&310W4VAONKxocQ?EjQF&o#N1REAJu&eAi@k8P`UzY9+b<#%>b7I3mE}P z2_S|93lGq8AO-@Er6BPSKn92{01O}jAPv;d5CFu;03;8>>Lw-rlKLkMaGcY*v3A8ae^MafX0w8su2=^eMP64O}Xe?M8 dhz2>7A4tI52a*8s;UGRYv4SB!H!}|+0szD{Vp0GA diff --git a/srcs/sorter/.DS_Store b/srcs/sorter/.DS_Store deleted file mode 100644 index 1899448440a408781893ff43821dffb96c14509b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!EVz)5S?uux(OhBKq|fYg2W*baYa!jRLKhE&|4)VH~>oRCL$KbTg47h390-Y z?Uk?L2lyO#v%9I1h90;e)b2>LZ+3Q`EkCb!y+kCs<9*tB;{Up0$larohNv8Y(L+22 zucE>HyZ?J$Iw?=mT=RaUCwW#@oz73Ow(d3VY)ILXt^2JH@lZ|TDyhb0HyOR--eFP= zQyaflD!+`A^i4LH^!$e}RZ%5bF&Jrb)*qnc{oAbQt4UXli+-uE6Pp1ko3h#Sx2Dsb zXPtHs?u4^;Fb%i2(b?@hpUs+b^KrO$aP;}~>-5{~?A*Lafpt&Y1B-LGKya;6U*b`b ztKuVSnD0SFt*2Qzje^L(fIl%W0MSC-jaBSYi7N^8E9lwEj=$lN1^?Fdum) z=gadEBj4feg-Ud9x!JiZ@7{79+~Ye1oC2!~@cIzI86%6eLA`XK(MJHFhqN}te3oEN zU@@{-8^j1q7%I?Eg*{>jLq|Tab&@m?FikKk-vR~yt6Gb7k diff --git a/srcs/sorter/long_suites/step1_target_index.o b/srcs/sorter/long_suites/step1_target_index.o deleted file mode 100644 index 762eb7286443608a03ad1a64ccb9d3e1c0de5626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmaJ?O=uHA6rR-D25e0ZiWS5L?4cea!BfRcq%I6-phyF~lxZ5%A5D{x9~y-~AW>MB zh+q#rie9{X@!)@jD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qkiQ5`{=vWyH6LR`z0nsPcTW4?1k?#P46Q1h zn)6s(7P$Tc$*1N$7WW3Y5rtE8|ARY&KQi9dL<6%%VBf)FrbHeVzr+JPAc=^IClSEy zOeq^z7RJvLT*o6g@7pS-Itg7q)r0fYRUDlE6~x35$SpYGn7-rTn2BktC}z!hF=JUd uCJKm@S2U+)MAn*{E@qg>J%pAD8NVpfX0~7nr1B;cSu;Ov734Bus>X)}DM)4j diff --git a/srcs/sorter/long_suites/step3_find_shortest_action.o b/srcs/sorter/long_suites/step3_find_shortest_action.o deleted file mode 100644 index 0e13881ac91af5529bb3a722fd6e56e2d714a98d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2104 zcma)7UuauZ82>Ws7I1n428=jq9!gmsBApEE=u4`*azG11R`6vWvwCO3k~FqATNnlg zw-e8PFDZSm<{R1QXWci? z4)jR+!X_{uQ-6J!$YJLQU1f-tl=BOvN^ahl)$-*+`5h@=KOOlPzp^}6t+DpFspU9| zvLzp~E)7z8d3j+mSMrQi%DwfaZPHDf)U$jM#}h>PNM?KyJB4k=aukPSWAUME7pNl+ zTmx2s$fq;d!;6oM_OSi`$a6ydDuS)Fs`pfNJE-@_S(!m%P~V315~Q%+YcrE_x5E0i z5pRX=R%}hVT{y$)z}TIDai_x_YO2OARbwyJ{b8#6Ox4~;)n?;P=lMMqw1(4KIwEv; zMDTt3-0cg_=xHL|51J9G+7)W9Ekd_s!h?D+t4kaSQSCNMIXBNoaHz;uDcs2`_Qht_in_TYq(|Ve8${Cy-m(FeiZp= z5t2Y}cifFw=x&Q}wlzJIa8?p<8@VKdY_KyMa$$SIu5#SArp8)aW&b)8+ z_bk2&M30#hRv)+cHV{0Avli190opzRbPy2DecI~LJw9V~fL=UDj*sr~t%0chLoThq zw$FcNpH8xrtC75%_ZB_rFUUf9$y@YEE>!$Nsc^-U_^T`|l$S_)mvY5w&L6TA$^~Cu m$}JXh=ZhX9N`*4XB|kTRQ5L=OyMCTz?)(xWidFmXNc120+W2t* diff --git a/srcs/sorter/long_suites/step4_sort.o b/srcs/sorter/long_suites/step4_sort.o deleted file mode 100644 index 0c41d8e0e76ab2d1998437f5d825169c25e29953..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1536 zcmbVM&1(}u6n|Tzjo5Y<5mXe+A>j6~pq}>Np`w8~D5$hhgfhgMHa#Q_+XQ1lCbUi%LS;z26)AS!tE9}pVQB*##&@%LtCo3Dx=kG%KW_vU@fdozNP#A{{x2*({Tk#Z0-#o|>ebPR&k7S{D~b^f%|@z3f25 z*%YHShKQt`U(OZM^F>+8-(Sk#lk)ntXpJ#z@=O`y6!P$1+`~j>$$)l{GLw}HK{}U- z^#1*A8t<&hw`TGgm5!lg^v!q)dsU^Z2t&3Zg2QEEHHSLWFa7SxS5#M4RNg1%wioPkxCy3zr`ta_i_-nAKRs)@QERm``x?el8&?|U7nWM8 zZPQnj$<^LiFJnG4?Y9Tdr~a`!5))eci%@QKFciDmIKN*NhcjF>I)_jFMY*3pN2+;p zq&{|Ti;w?8|LI4=cILLR7frhw^mUJnjK;F4acKR7@wHZOlT~&sXKXb73|>jt`E2~3 z*bT_!C%Q7>JRZ3^e#FGFAC8-xJ?&@e4EfFCA>rpuLLk;_q6YpCyjMWHFK-nX1KtAS z=Y2-bIPeY-Z^BCeVOM1t!DO>w2JstJy3!B;G)u}dIiM#7^pgWR_thKEH?vniKA@9a eSq_R?%G^?Zg=7!}EST>?Fb8P}a3PIwMZW;$8a2uQ diff --git a/srcs/sorter/main.o b/srcs/sorter/main.o deleted file mode 100644 index cd83043b45fe31ddb07e7bc85f96b1f9780b1ebc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2120 zcma)7O=uHA6rR*->rYMnuc(-VhzKiIJQM_J(ZGTptXS|;$89=oL-WUG*G44}iIpx< z>_ren@Zh1x;z2}E;tv%B5j^;F@l-KIh2lYiXzTZOX6ris;E>txeQ&;b@6FrY?DMam z=9(CbEMmA|He%i(BZi5w5wnB%Uq-D#F1%KnfFmZONpWd#?uddTZOM9$ecnWm{GtIVJ{$A^#-m*Z_>7Njo6Ies%;i zJV;A(UD)}bc8}@3GtYf2L2i1*x><4S=B46zjkd$6nwQ-1ySqW8rxJ&xL#leJ(&xoz z%}Q}r3I1i&15IF1v_iA*-8(-KiH_p5Y-Shb_A_-hn-$a*uOb2Ja#hAKnYlebKQGm! z9Ft~8kZH`D^38IcMMt+U1SV-ola{UiBWB-qRpY9sHr` zy_Edi;}Rsjj|Rs5{+2(+p2WYw!>Glct9s?dYvp3SA$su|R_II>7oF^>`7ylsH0rCN z+dkEcsQsacpK3bo`Bp?lxwUX*<>K_>=;bZ`iZ7Qra_F3LvH~?%0_5xP}>921M@DLFHOU8a+BXB2hC6N9jmH}fxr1slFcn3TRBN(?75AMfh z@X#{r()fFgk7>MHyDmg!3gd{z~K5H9n_tiWQDWXASe5wmzZpts1ANKD_^| z#@jW%PveZIMLLl?&3Ilo+_CII0KPY(!2jrlE^Vb!BJaS;+PL<)eSIn66P^SYr>vA~ zIfCQkmCR=H4B?Uv&sq5RfY`$7=STz7kHiyJUVsSO&f17(Co_ZG$>Nv8&OFa%q)Fus z3jt@^N@f_hQiEAL=?tY+d>n(}11FF-mGXCrbj~@=^Ny7mW^|aq^hL^z1au0~A1vnF R{E(lA4_K+Z;C<*9jURj&mw5mH diff --git a/srcs/sorter/short_suites/short_suites.o b/srcs/sorter/short_suites/short_suites.o deleted file mode 100644 index ef9fac267a2cd98b811184c19d781e4be9548b6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3008 zcmb7GTWB0r7(Sb%X{t?UD{50v6VyVjjF+NN$jg?xF!h2L8d0H~ZqrG!n!PYPOJiXn zu#GSsviM*h6p`SI1z$u&M6}e)Ly3re(mqC6VHYCo<5FtV??2~1?Ck6=O%HSC`)}vJ zob%6~{o}@ew{{AV7#4V8j$nRA#1tmRe#|4p4;Yt5wc9>yQqC4~#muZP%lWg}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