We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e331f9 commit 04fd7efCopy full SHA for 04fd7ef
src/pawns.cpp
@@ -226,9 +226,7 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) {
226
Bitboard ourPawns = b & pos.pieces(Us);
227
Bitboard theirPawns = b & pos.pieces(Them);
228
Rank rkUs, rkThem;
229
- File kf = file_of(ksq);
230
-
231
- kf = (kf == FILE_A) ? FILE_B : (kf == FILE_H) ? FILE_G : kf;
+ File kf = std::max(FILE_B, std::min(FILE_G, file_of(ksq)));
232
233
for (int f = kf - 1; f <= kf + 1; f++)
234
{
0 commit comments