X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=b531cc27d26489fc64a97890d571b1dd254c0a83;hp=6042ae3312e1690f3a2b26a72895532ef1ddb455;hb=820c5c25b649d6bdd51bed14a16efdc11719b588;hpb=6c898a10be75bc2c295a7dca7f72e51e76ec8293 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6042ae33..b531cc27 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -512,8 +512,6 @@ namespace { const Color Them = (Us == WHITE ? BLACK : WHITE); const Direction Up = (Us == WHITE ? NORTH : SOUTH); - const Direction Left = (Us == WHITE ? NORTH_WEST : SOUTH_EAST); - const Direction Right = (Us == WHITE ? NORTH_EAST : SOUTH_WEST); const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB); Bitboard b, weak, defended, nonPawnEnemies, stronglyProtected, safeThreats; @@ -529,7 +527,7 @@ namespace { b = pos.pieces(Us, PAWN) & (~attackedBy[Them][ALL_PIECES] | attackedBy[Us][ALL_PIECES]); - safeThreats = (shift(b) | shift(b)) & weak; + safeThreats = pos.pawn_attacks(b) & weak; score += ThreatBySafePawn * popcount(safeThreats); } @@ -585,7 +583,7 @@ namespace { & (attackedBy[Us][ALL_PIECES] | ~attackedBy[Them][ALL_PIECES]); // Bonus for safe pawn threats on the next move - b = (shift(b) | shift(b)) + b = pos.pawn_attacks(b) & pos.pieces(Them) & ~attackedBy[Us][PAWN];