1
0
Fork 0

Simplify pawn moves (#1900)

If we define dcCandidates with & pawnsNotOn7, 
we don't have to & it both times.

This seems more clear to me as well.

Tested for no regression.
STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 44042 W: 9663 L: 9585 D: 24794
http://tests.stockfishchess.org/tests/view/5c21d9120ebc5902ba12e84d

No functional change.
pull/1951/head
protonspring 2019-01-14 07:03:31 -07:00 committed by Marco Costalba
parent 230fb6e9ad
commit 3732c55c18
1 changed files with 3 additions and 3 deletions

View File

@ -93,10 +93,10 @@ namespace {
// if the pawn is not on the same file as the enemy king, because we
// don't generate captures. Note that a possible discovery check
// promotion has been already generated amongst the captures.
Bitboard dcCandidates = pos.blockers_for_king(Them);
if (pawnsNotOn7 & dcCandidates)
Bitboard dcCandidateQuiets = pos.blockers_for_king(Them) & pawnsNotOn7;
if (dcCandidateQuiets)
{
Bitboard dc1 = shift<Up>(pawnsNotOn7 & dcCandidates) & emptySquares & ~file_bb(ksq);
Bitboard dc1 = shift<Up>(dcCandidateQuiets) & emptySquares & ~file_bb(ksq);
Bitboard dc2 = shift<Up>(dc1 & TRank3BB) & emptySquares;
b1 |= dc1;