mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Faster castling in Chess960 case
Only rook attackers has to be considered, all other attackers are already handled in the lines above. No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
b9768b8bc5
commit
555d9a8711
@@ -56,7 +56,7 @@ namespace {
|
|||||||
// Because we generate only legal castling moves we need to verify that
|
// Because we generate only legal castling moves we need to verify that
|
||||||
// when moving the castling rook we do not discover some hidden checker.
|
// when moving the castling rook we do not discover some hidden checker.
|
||||||
// For instance an enemy queen in SQ_A1 when castling rook is in SQ_B1.
|
// For instance an enemy queen in SQ_A1 when castling rook is in SQ_B1.
|
||||||
if (Chess960 && (pos.attackers_to(kto, pos.pieces() ^ rfrom) & enemies))
|
if (Chess960 && (attacks_bb<ROOK>(kto, pos.pieces() ^ rfrom) & pos.pieces(~us, ROOK, QUEEN)))
|
||||||
return mlist;
|
return mlist;
|
||||||
|
|
||||||
(mlist++)->move = make<CASTLE>(kfrom, rfrom);
|
(mlist++)->move = make<CASTLE>(kfrom, rfrom);
|
||||||
|
|||||||
Reference in New Issue
Block a user