From cf1464e003c8f8ad3ad11b3e064db9906e6613bb Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 31 Aug 2022 01:52:01 +0300 Subject: fix: typo --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index ad17d1f..5a66201 100644 --- a/src/main.c +++ b/src/main.c @@ -461,10 +461,10 @@ Move find_best_move(int* board, int color, int depth, int alpha, int beta, int* // You only have available moves if your king hasn't been taken if (compute_material_advantage(board, color) > -INFINITY / 2) { Move available_moves[MAX_AVAILABLE_MOVES]; - int availabel_moves_count = list_available_moves(available_moves, board, color); - sort_moves(available_moves, availabel_moves_count, board); + int available_moves_count = list_available_moves(available_moves, board, color); + sort_moves(available_moves, available_moves_count, board); - for (int i = 0; i < availabel_moves_count; i++) { + for (int i = 0; i < available_moves_count; i++) { *metrics += 1; Move move = available_moves[i]; @@ -472,7 +472,7 @@ Move find_best_move(int* board, int color, int depth, int alpha, int beta, int* move.value = depth < MAX_DEPTH ? find_best_move(board, 1 - color, depth + 1, alpha, beta, metrics).value - : compute_score(board, availabel_moves_count, color); + : compute_score(board, available_moves_count, color); reverse_move(move, captured_piece, board); -- cgit v1.2.3