diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |