X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmove.cpp;h=cb6b5dfdc3bd80ad27f6e3e1dc100103ca86c69d;hb=5fc8f86a4f37de0e919c163c81f04b8717a70d3f;hp=2a18c1c4eb10eb342d6cf3520e40a4038229146c;hpb=c14dae1fa20507e3f3c729ee9de6ed55ab11dba6;p=stockfish diff --git a/src/move.cpp b/src/move.cpp index 2a18c1c4..cb6b5dfd 100644 --- a/src/move.cpp +++ b/src/move.cpp @@ -135,7 +135,7 @@ const std::string move_to_uci(Move move, bool chess960) { } -/// Overload the << operator, to make it easier to print moves. +/// Overload the << operator, to make it easier to print moves std::ostream& operator << (std::ostream& os, Move m) { @@ -144,9 +144,9 @@ std::ostream& operator << (std::ostream& os, Move m) { } -/// move_is_ok(), for debugging. +/// move_is_ok(), for debugging bool move_is_ok(Move m) { - return square_is_ok(move_from(m)) && square_is_ok(move_to(m)); + return move_from(m) != move_to(m); // Catches also MOVE_NONE }