diff --git a/src/Lynx/Search/NegaMax.cs b/src/Lynx/Search/NegaMax.cs index 4f242e9fa..832fe5b25 100644 --- a/src/Lynx/Search/NegaMax.cs +++ b/src/Lynx/Search/NegaMax.cs @@ -71,7 +71,7 @@ private int NegaMax(int depth, int ply, int alpha, int beta, bool parentWasNullM { ++depth; } - if (depth <= 0) + else if (depth <= 0) { if (MoveGenerator.CanGenerateAtLeastAValidMove(position)) { @@ -82,8 +82,7 @@ private int NegaMax(int depth, int ply, int alpha, int beta, bool parentWasNullM _tt.RecordHash(_ttMask, position, depth, ply, finalPositionEvaluation, NodeType.Exact); return finalPositionEvaluation; } - - if (!pvNode && !isInCheck) + else if (!pvNode) { var (staticEval, phase) = position.StaticEvaluation();