X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=d3afddeb4fb1df982f15604d0f5c70eafa905e23;hp=8e7a5aa5d24de004688134b12dbbe75d9c902697;hb=62ae6157a36e926c087b0303973e404a05e6de09;hpb=33d95482182e459eb033de47a31f142880aa9afb diff --git a/src/position.cpp b/src/position.cpp index 8e7a5aa5..d3afddeb 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -318,8 +318,6 @@ Position& Position::set(const string& fenStr, bool isChess960, StateInfo* si, Th thisThread = th; set_state(st); - assert(pos_is_ok()); - return *this; } @@ -476,7 +474,7 @@ const string Position::fen() const { if (can_castle(BLACK_OOO)) ss << (chess960 ? char('a' + file_of(castling_rook_square(BLACK | QUEEN_SIDE))) : 'q'); - if (!can_castle(WHITE) && !can_castle(BLACK)) + if (!can_castle(ANY_CASTLING)) ss << '-'; ss << (ep_square() == SQ_NONE ? " - " : " " + UCI::square(ep_square()) + " ") @@ -579,7 +577,6 @@ bool Position::legal(Move m) const { /// Position::pseudo_legal() takes a random move and tests whether the move is /// pseudo legal. It is used to validate moves from TT that can be corrupted /// due to SMP concurrent access or hash position key aliasing. -/// MOVE_NONE is represented as SQ_A1 to SQ_A1 which is never pseudo_legal. bool Position::pseudo_legal(const Move m) const {