mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
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.
This commit is contained in:
parent
230fb6e9ad
commit
3732c55c18
1 changed files with 3 additions and 3 deletions
|
@ -93,10 +93,10 @@ namespace {
|
||||||
// if the pawn is not on the same file as the enemy king, because we
|
// 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
|
// don't generate captures. Note that a possible discovery check
|
||||||
// promotion has been already generated amongst the captures.
|
// promotion has been already generated amongst the captures.
|
||||||
Bitboard dcCandidates = pos.blockers_for_king(Them);
|
Bitboard dcCandidateQuiets = pos.blockers_for_king(Them) & pawnsNotOn7;
|
||||||
if (pawnsNotOn7 & dcCandidates)
|
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;
|
Bitboard dc2 = shift<Up>(dc1 & TRank3BB) & emptySquares;
|
||||||
|
|
||||||
b1 |= dc1;
|
b1 |= dc1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue