rules: fix issue with bishop's promoting
This commit is contained in:
parent
9595d0f435
commit
5a6893acc7
|
@ -365,8 +365,10 @@ fn get_moves_from_bb(
|
||||||
// Automatic queen promotion for pawns moving to the opposite rank.
|
// Automatic queen promotion for pawns moving to the opposite rank.
|
||||||
if
|
if
|
||||||
piece == PAWN
|
piece == PAWN
|
||||||
&& (color == WHITE && sq_rank(ray_square) == RANK_8)
|
&& (
|
||||||
|
(color == WHITE && sq_rank(ray_square) == RANK_8)
|
||||||
|| (color == BLACK && sq_rank(ray_square) == RANK_1)
|
|| (color == BLACK && sq_rank(ray_square) == RANK_1)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m.promotion = Some(QUEEN);
|
m.promotion = Some(QUEEN);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue