File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -701,7 +701,8 @@ namespace {
701701 if (pos.non_pawn_material () < SpaceThreshold)
702702 return SCORE_ZERO;
703703
704- constexpr Color Them = (Us == WHITE ? BLACK : WHITE);
704+ constexpr Color Them = (Us == WHITE ? BLACK : WHITE);
705+ constexpr Direction Down = (Us == WHITE ? SOUTH : NORTH);
705706 constexpr Bitboard SpaceMask =
706707 Us == WHITE ? CenterFiles & (Rank2BB | Rank3BB | Rank4BB)
707708 : CenterFiles & (Rank7BB | Rank6BB | Rank5BB);
@@ -713,8 +714,8 @@ namespace {
713714
714715 // Find all squares which are at most three squares behind some friendly pawn
715716 Bitboard behind = pos.pieces (Us, PAWN);
716- behind |= (Us == WHITE ? behind >> 8 : behind << 8 );
717- behind |= (Us == WHITE ? behind >> 16 : behind << 16 );
717+ behind |= shift<Down>( behind);
718+ behind |= shift<Down>(shift<Down>( behind) );
718719
719720 int bonus = popcount (safe) + popcount (behind & safe);
720721 int weight = pos.count <ALL_PIECES>(Us)
You can’t perform that action at this time.
0 commit comments