mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00: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:
parent
b9768b8bc5
commit
555d9a8711
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ namespace {
|
|||
// Because we generate only legal castling moves we need to verify that
|
||||
// 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.
|
||||
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;
|
||||
|
||||
(mlist++)->move = make<CASTLE>(kfrom, rfrom);
|
||||
|
|
Loading…
Add table
Reference in a new issue