X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=c814e7657a7e8505d557ff77c673e03889d580c4;hp=e69528ad0c628a2aca423d0d2575386dc75390db;hb=f78b68b7ffd05888bd663acdf400276913126cd5;hpb=e82382703c96cfc480555e9db29d999e1f54a38f diff --git a/src/position.cpp b/src/position.cpp index e69528ad..c814e765 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -400,14 +400,22 @@ const string Position::pretty(Move move) const { std::ostringstream ss; if (move) - ss << "\nMove is: " << (sideToMove == BLACK ? ".." : "") + ss << "\nMove: " << (sideToMove == BLACK ? ".." : "") << move_to_san(*const_cast(this), move); for (Square sq = SQ_A1; sq <= SQ_H8; sq++) if (piece_on(sq) != NO_PIECE) brd[513 - 68*rank_of(sq) + 4*file_of(sq)] = PieceToChar[piece_on(sq)]; - ss << brd << "\nFen is: " << fen() << "\nKey is: " << st->key; + ss << brd << "\nFen: " << fen() << "\nKey: " << st->key << "\nCheckers: "; + + for (Bitboard b = checkers(); b; ) + ss << square_to_string(pop_lsb(&b)) << " "; + + ss << "\nLegal moves: "; + for (MoveList ml(*this); !ml.end(); ++ml) + ss << move_to_san(*const_cast(this), ml.move()) << " "; + return ss.str(); }