Indicate promotion status in bughouse FENs
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 25 Jun 2023 20:36:28 +0000 (22:36 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 25 Jun 2023 20:36:28 +0000 (22:36 +0200)
src/position.cpp

index eb2a9ce..3da05e2 100644 (file)
@@ -698,7 +698,7 @@ string Position::fen(bool sfen, bool showPromoted, int countStarted, std::string
                   ss << piece_to_char()[piece_on(make_square(f, r))];
 
                   // Set promoted pieces
-                  if (((captures_to_hand() && !drop_loop()) || showPromoted) && is_promoted(make_square(f, r)))
+                  if (((captures_to_hand() && !drop_loop()) || two_boards() ||  showPromoted) && is_promoted(make_square(f, r)))
                       ss << "~";
               }
           }