X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=3d99bfc68645a3e327554eef3fc2e067755a1297;hp=fca33f281a2bb69c6641d6f0c519b50a40c9dadf;hb=3e4dfb49a747be902d25ae06783f98ba29fb5030;hpb=9a1d5f0f1d8a12a85b198688d4f1d636a146eb7a diff --git a/src/pawns.cpp b/src/pawns.cpp index fca33f28..3d99bfc6 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -176,6 +176,12 @@ namespace { value += CandidateBonus[relative_rank(Us, s)]; } + e->pawnsOnWhiteSquaresCount[Us] = popcount(ourPawns & WhiteSquares); + e->pawnsOnWhiteSquaresCount[Them] = popcount(theirPawns & WhiteSquares); + + e->pawnsOnBlackSquaresCount[Us] = popcount(ourPawns & BlackSquares); + e->pawnsOnBlackSquaresCount[Them] = popcount(theirPawns & BlackSquares); + return value; } } @@ -231,7 +237,7 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) { Rank rkUs, rkThem; File kf = file_of(ksq); - kf = (kf == FILE_A) ? kf++ : (kf == FILE_H) ? kf-- : kf; + kf = (kf == FILE_A) ? FILE_B : (kf == FILE_H) ? FILE_G : kf; for (int f = kf - 1; f <= kf + 1; f++) {