mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
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 <mcostalba@gmail.com>
This commit is contained in:
parent
3c05bd70eb
commit
f4758ced90
1 changed files with 4 additions and 4 deletions
|
@ -243,7 +243,7 @@ const std::string Position::to_fen() const {
|
||||||
|
|
||||||
fen += (rank > RANK_1 ? '/' : ' ');
|
fen += (rank > RANK_1 ? '/' : ' ');
|
||||||
}
|
}
|
||||||
fen += (sideToMove == WHITE ? 'w' : 'b') + ' ';
|
fen += (sideToMove == WHITE ? "w " : "b ");
|
||||||
if (castleRights != NO_CASTLES)
|
if (castleRights != NO_CASTLES)
|
||||||
{
|
{
|
||||||
if (can_castle_kingside(WHITE)) fen += 'K';
|
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 << "+---+---+---+---+---+---+---+---+" << std::endl;
|
std::cout << "+---+---+---+---+---+---+---+---+" << std::endl
|
||||||
std::cout << "Fen is: " << to_fen() << std::endl;
|
<< "Fen is: " << to_fen() << std::endl
|
||||||
std::cout << key << std::endl;
|
<< "Key is: " << key << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue