]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Use 'moveCount' name also in RootSearch
[stockfish] / src / movegen.cpp
index 8cb5d4d67280f5a5431eabd0e767e888d1b29b8d..f688bfef67054c138a5d96c72ef3a1478150fb9f 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 (RookPseudoAttacks[checksq] & (1ULL << ksq))
               sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from<BISHOP>(checksq);
           else
               sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from<ROOK>(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<PAWN>(ksq, Them);
             b2 &= pos.attacks_from<PAWN>(ksq, Them);
 
@@ -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);