push_swap/include/app/best_move.h

44 lines
1.5 KiB
C
Raw Permalink Normal View History

2024-01-29 22:45:54 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* best_move.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/29 20:10:21 by maiboyer #+# #+# */
/* Updated: 2024/02/08 13:30:30 by maiboyer ### ########.fr */
2024-01-29 22:45:54 +01:00
/* */
/* ************************************************************************** */
#ifndef BEST_MOVE_H
# define BEST_MOVE_H
2024-01-29 22:45:54 +01:00
# include "app/state.h"
# include "me/vec/vec_i64.h"
2024-01-29 22:45:54 +01:00
struct s_functions
2024-01-31 16:15:47 +01:00
{
void (*forward)(void *);
void (*reverse)(void *);
2024-01-29 22:45:54 +01:00
};
typedef t_usize (*t_iter_pos_func)(t_vec_i64 *);
2024-02-07 14:46:49 +01:00
2024-01-31 16:15:47 +01:00
typedef struct s_best_move_args
{
t_iter_pos_func iter_func;
t_usize index;
t_vec_i64 *from;
t_vec_i64 *to;
void *args;
struct s_functions main;
struct s_functions other;
struct s_functions both;
bool print_stuff;
} t_best_move_args;
2024-01-29 22:45:54 +01:00
void run_func_with_best_rotate_for_item(t_state *state,
t_best_move_args data);
2024-01-29 22:45:54 +01:00
#endif /* BEST_MOVE_H */