From f4758ced90ceb30130c283237680edb59c24137b Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 15 Nov 2008 08:27:52 +0100 Subject: [PATCH] Position::to_fen(): fix a bug in side to move representation Was introduced almost two months ago in patch: "Space inflate Position::to_fen()" Signed-off-by: Marco Costalba --- src/position.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/position.cpp b/src/position.cpp index 8390facc..df6b4270 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -243,7 +243,7 @@ const std::string Position::to_fen() const { fen += (rank > RANK_1 ? '/' : ' '); } - fen += (sideToMove == WHITE ? 'w' : 'b') + ' '; + fen += (sideToMove == WHITE ? "w " : "b "); if (castleRights != NO_CASTLES) { if (can_castle_kingside(WHITE)) fen += 'K'; @@ -291,9 +291,9 @@ void Position::print(Move m) const { } std::cout << '|' << std::endl; } - std::cout << "+---+---+---+---+---+---+---+---+" << std::endl; - std::cout << "Fen is: " << to_fen() << std::endl; - std::cout << key << std::endl; + std::cout << "+---+---+---+---+---+---+---+---+" << std::endl + << "Fen is: " << to_fen() << std::endl + << "Key is: " << key << std::endl; } -- 2.39.2