Fix fifty move counter not updating correctly during search
This commit is contained in:
parent
8ed36b9205
commit
8281130c9a
1 changed files with 5 additions and 2 deletions
|
@ -266,9 +266,12 @@ namespace ChessChallenge.Chess
|
|||
UpdateSliderBitboards();
|
||||
|
||||
// Pawn moves and captures reset the fifty move counter and clear 3-fold repetition history
|
||||
if (!inSearch && (movedPieceType == PieceHelper.Pawn || capturedPieceType != PieceHelper.None))
|
||||
if (movedPieceType == PieceHelper.Pawn || capturedPieceType != PieceHelper.None)
|
||||
{
|
||||
if (!inSearch)
|
||||
{
|
||||
RepetitionPositionHistory.Clear();
|
||||
}
|
||||
newFiftyMoveCounter = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue