diff --git a/engine/include/bitboard.h b/engine/include/bitboard.h index acd9318..1a9aab1 100644 --- a/engine/include/bitboard.h +++ b/engine/include/bitboard.h @@ -114,4 +114,7 @@ void gen_white_pawn_captures(const struct Board *board, struct Move *moves, int void gen_black_pawn_captures(const struct Board *board, struct Move *moves, int *count); void gen_white_pawn_capture_promotions(const struct Board *board, struct Move *moves, int *count); void gen_black_pawn_capture_promotions(const struct Board *board, struct Move *moves, int *count); -int gen_pseudo_moves(const struct Board *board, struct Move *out, bool captures_only); \ No newline at end of file +int gen_pseudo_moves(const struct Board *board, struct Move *out, bool captures_only); +int get_legal_moves(struct Board *board, struct Move *out); +bool in_check(const struct Board *board, enum Color side); +bool apply_move_on_copy(struct Board *in, struct Board *out, struct Move m); \ No newline at end of file diff --git a/engine/src/ai/negamax.c b/engine/src/ai/negamax.c index de45e25..87fbe99 100644 --- a/engine/src/ai/negamax.c +++ b/engine/src/ai/negamax.c @@ -112,12 +112,4 @@ int ai_find_best_move_with_window(struct Board *board, int depth, int window_cp, int pick = cand_idx[rand_uniform(cand_n)]; *best_out = moves[pick]; return 1; -} - -int ai_play(struct Board *b, int depth) { - struct Move m; - struct Board after; - if (!apply_move_on_copy(b, &after, m)) return 0; - *b = after; - return 1; } \ No newline at end of file