X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=f688bfef67054c138a5d96c72ef3a1478150fb9f;hp=d6710d1ccbf61b6d4b8d9d2f185035e2f2cf1ab5;hb=97212bafc90f2c356488489db81cfdca3707039d;hpb=a0f0a7dc4f117e8ed85c94caf2c2da9804c3d296 diff --git a/src/movegen.cpp b/src/movegen.cpp index d6710d1c..f688bfef 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -244,7 +244,7 @@ MoveStack* generate_evasions(const Position& pos, MoveStack* mlist) { case QUEEN: // In case of a queen remove also squares attacked in the other direction to // avoid possible illegal moves when queen and king are on adjacent squares. - if (direction_is_straight(checksq, ksq)) + if (RookPseudoAttacks[checksq] & (1ULL << ksq)) sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from(checksq); else sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from(checksq); @@ -562,7 +562,7 @@ namespace { if (Type == CHECK) { - // Condider only pawn moves which give direct checks + // Consider only pawn moves which give direct checks b1 &= pos.attacks_from(ksq, Them); b2 &= pos.attacks_from(ksq, Them);