diff --git a/Rudim/Search/Quiescence.cs b/Rudim/Search/Quiescence.cs index b0c52a1..721f3b2 100644 --- a/Rudim/Search/Quiescence.cs +++ b/Rudim/Search/Quiescence.cs @@ -29,11 +29,11 @@ public static int Search(BoardState boardState, int alpha, int beta, Cancellatio MoveOrdering.SortMoves(boardState); - for (int i = 0; i < boardState.Moves.Count; ++i) + foreach (var t in boardState.Moves) { if (cancellationToken.IsCancellationRequested) break; - Move move = boardState.Moves[i]; + Move move = t; if (!move.IsCapture()) break; // If sorted, once a quiet move is reached we won't need to visit the remaining nodes