summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-08-31 01:52:01 +0300
committereug-vs <eugene@eug-vs.xyz>2022-08-31 01:52:01 +0300
commitcf1464e003c8f8ad3ad11b3e064db9906e6613bb (patch)
treee21fa90e2070ff54ab208cd10197a1f1362e0e83
parentfa5d16da163a2434e92d6db745bf44ff51e254ca (diff)
downloadc-chess-cf1464e003c8f8ad3ad11b3e064db9906e6613bb.tar.gz
fix: typo
-rw-r--r--src/main.c8
1 files 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);