X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.cpp;h=c6c20dbce73d40c2e4f45270de6689c1e1eee8bd;hb=94dcac1feeb142a56ed2ebddb96ef672460f1d49;hp=be4e234d99d9b937036ee9d6fabb9cec170a0e40;hpb=deecb3757ca03fa2c9ebc87fd9efe4c2ba05f740;p=stockfish diff --git a/src/position.cpp b/src/position.cpp index be4e234d..c6c20dbc 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -458,13 +458,6 @@ void Position::find_checkers() { /// Position::pl_move_is_legal() tests whether a pseudo-legal move is legal -bool Position::pl_move_is_legal(Move m) const { - - // If we're in check, all pseudo-legal moves are legal, because our - // check evasion generator only generates true legal moves. - return is_check() || pl_move_is_legal(m, pinned_pieces(side_to_move())); -} - bool Position::pl_move_is_legal(Move m, Bitboard pinned) const { assert(is_ok()); @@ -1337,7 +1330,6 @@ int Position::see(Square from, Square to) const { Bitboard attackers, stmAttackers, b; - assert(!shortcut || from != SQ_NONE); assert(square_is_ok(from) || from == SQ_NONE); assert(square_is_ok(to)); @@ -1726,11 +1718,10 @@ bool Position::has_mate_threat(Color c) { MoveStack mlist[120]; bool result = false; - Bitboard dc = discovered_check_candidates(sideToMove); Bitboard pinned = pinned_pieces(sideToMove); // Generate pseudo-legal non-capture and capture check moves - MoveStack* last = generate_non_capture_checks(*this, mlist, dc); + MoveStack* last = generate_non_capture_checks(*this, mlist); last = generate_captures(*this, last); // Loop through the moves, and see if one of them is mate