Skip to content

Commit efcae33

Browse files
author
thomas.jahn
committed
fixed #5
1 parent a07a250 commit efcae33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MinimalChess/IterativeSearch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ private void StorePVinTT(Move[] pv, int depth)
6363
return (ttScore, Array.Empty<Move>());
6464

6565
var result = EvalPosition(position, ply, depth, window);
66-
Transpositions.Store(position.ZobristHash, depth, ply, window, result.Score, result.PV.Length > 0 ? result.PV[0] : default);
66+
if(!Aborted)
67+
Transpositions.Store(position.ZobristHash, depth, ply, window, result.Score, result.PV.Length > 0 ? result.PV[0] : default);
68+
6769
return result;
6870
}
6971

@@ -136,8 +138,6 @@ private void StorePVinTT(Move[] pv, int depth)
136138
continue;
137139
}
138140

139-
//the position has a new best move and score!
140-
Transpositions.Store(position.ZobristHash, depth, ply, window, eval.Score, move);
141141
//set the PV to this move, followed by the PV of the childnode
142142
pv = Merge(move, eval.PV);
143143
//...and maybe we even get a beta cutoff

0 commit comments

Comments
 (0)