bug or not
Posted: Sat May 25, 2019 6:39 pm
Reading Stockfish KPK code today, I found this
where a Bitboard PseudoAttacks[][] is used (&) with a Square psq. Isn't this a bug ?
Code: Select all
// Immediate win if a pawn can be promoted without getting captured
else if ( us == WHITE
&& rank_of(psq) == RANK_7
&& ksq[us] != psq + NORTH
&& ( distance(ksq[~us], psq + NORTH) > 1
|| (PseudoAttacks[KING][ksq[us]] & (psq + NORTH))))
result = WIN;