45 lines
1.5 KiB
C
45 lines
1.5 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* best_move.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/01/29 20:10:21 by maiboyer #+# #+# */
|
|
/* Updated: 2024/01/29 20:28:35 by maiboyer ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef BEST_MOVE_H
|
|
#define BEST_MOVE_H
|
|
|
|
#include "app/state.h"
|
|
|
|
enum e_stack_selector {
|
|
STACK_A,
|
|
STACK_B,
|
|
};
|
|
|
|
enum e_zero_position {
|
|
MIN_ZERO_POS,
|
|
MAX_ZERO_POS,
|
|
};
|
|
|
|
struct s_functions {
|
|
void (*forward)(void *);
|
|
void (*reverse)(void *);
|
|
};
|
|
|
|
typedef struct s_best_move_args {
|
|
enum e_stack_selector main_stack;
|
|
enum e_zero_position zero_pos;
|
|
void *function_arguments;
|
|
struct s_functions main;
|
|
struct s_functions other;
|
|
struct s_functions both;
|
|
} t_best_move_args;
|
|
|
|
void run_func_with_best_rotate_for_item(t_state *state, t_usize index,
|
|
t_best_move_args data);
|
|
|
|
#endif /* BEST_MOVE_H */
|