X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=0db293ccc7eb713901e139665578821a3b077a9f;hp=8cb5d4d67280f5a5431eabd0e767e888d1b29b8d;hb=4dded4e72f9b9582db8adc9a478e9eda5841d8c5;hpb=d08a8d76f7d5b992d65614714cc76e3f13e00dfc diff --git a/src/movegen.cpp b/src/movegen.cpp index 8cb5d4d6..0db293cc 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 (squares_straight_aligned(checksq, ksq)) sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from(checksq); else sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from(checksq); @@ -659,7 +659,7 @@ namespace { Color us = pos.side_to_move(); - if ( (Side == KING_SIDE && pos.can_castle_kingside(us)) + if ( (Side == KING_SIDE && pos.can_castle_kingside(us)) ||(Side == QUEEN_SIDE && pos.can_castle_queenside(us))) { Color them = opposite_color(us);