1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Tidy up Position::pretty

No functional change.
This commit is contained in:
Marco Costalba 2013-07-29 19:33:30 +02:00
parent 1f40cd6d02
commit cc608a7aba

View file

@ -392,16 +392,18 @@ const string Position::pretty(Move move) const {
string brd = twoRows + twoRows + twoRows + twoRows + dottedLine;
for (Bitboard b = pieces(); b; )
{
Square s = pop_lsb(&b);
brd[513 - 68 * rank_of(s) + 4 * file_of(s)] = PieceToChar[piece_on(s)];
}
std::ostringstream ss;
if (move)
ss << "\nMove: " << (sideToMove == BLACK ? ".." : "")
<< move_to_san(*const_cast<Position*>(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: " << fen() << "\nKey: " << std::hex << std::uppercase
<< std::setfill('0') << std::setw(16) << st->key << "\nCheckers: ";