diff --git a/src/search.c b/src/search.c index af47b40..5cec4e4 100644 --- a/src/search.c +++ b/src/search.c @@ -141,7 +141,7 @@ int alpha_beta(Search *search, Board *board, int depth, int ply, int alpha, int int root_search(Search *search, Board *board, int depth, int ply, int alpha, int beta, Move *result) { Undo undo; Move moves[MAX_MOVES]; - int count = gen_moves(board, moves); + int count = gen_legal_moves(board, moves); sort_moves(search, board, moves, count); Move *best = NULL; for (int i = 0; i < count; i++) {