]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Retire direction.cpp
[stockfish] / src / movegen.cpp
index d6710d1ccbf61b6d4b8d9d2f185035e2f2cf1ab5..0db293ccc7eb713901e139665578821a3b077a9f 100644 (file)
@@ -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 (squares_straight_aligned(checksq, ksq))
               sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from<BISHOP>(checksq);
           else
               sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from<ROOK>(checksq);