mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Fix generation of check blocking promotion
A promotion move is not considered a possible evasion as it could be. Bug introduced by patch Convert also generate_pawn_blocking_evasions() to new API (7/5/2009) Bug spotted by Kenny Dail. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
67ac358ef2
commit
a5fce1958b
1 changed files with 2 additions and 2 deletions
|
@ -864,7 +864,7 @@ namespace {
|
|||
Bitboard blockSquares, MoveStack* mlist) {
|
||||
|
||||
// Calculate our parametrized parameters at compile time
|
||||
const Bitboard TRank8BB = (Us == WHITE ? Rank8BB : Rank1BB);
|
||||
const Rank TRANK_8 = (Us == WHITE ? RANK_8 : RANK_1);
|
||||
const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
|
||||
const SquareDelta TDELTA_N = (Us == WHITE ? DELTA_N : DELTA_S);
|
||||
|
||||
|
@ -882,7 +882,7 @@ namespace {
|
|||
|
||||
assert(pos.piece_on(to) == EMPTY);
|
||||
|
||||
if (square_rank(to) == TRank8BB)
|
||||
if (square_rank(to) == TRANK_8)
|
||||
{
|
||||
(*mlist++).move = make_promotion_move(to - TDELTA_N, to, QUEEN);
|
||||
(*mlist++).move = make_promotion_move(to - TDELTA_N, to, ROOK);
|
||||
|
|
Loading…
Add table
Reference in a new issue