Skip to content

Commit

Permalink
Make fold a tt key condition
Browse files Browse the repository at this point in the history
  • Loading branch information
PikaCat-OuO committed Nov 13, 2024
1 parent 384ae4a commit 5d911f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ inline Key Position::key() const { return adjust_key60<false>(st->key); }

template<bool AfterMove>
inline Key Position::adjust_key60(Key k) const {
return st->rule60 < 14 - AfterMove ? k : k ^ make_key((st->rule60 - (14 - AfterMove)) / 8);
return (st->rule60 < 14 - AfterMove ? k : k ^ make_key((st->rule60 - (14 - AfterMove)) / 8))
^ (filter[st->key] ? make_key(14) : 0);
}

inline Key Position::pawn_key() const { return st->pawnKey; }
Expand Down

0 comments on commit 5d911f2

Please sign in to comment.