mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
show coordinates when displaying board
closes https://github.com/official-stockfish/Stockfish/pull/2723 No functional change
This commit is contained in:
parent
1c65310c0e
commit
d0cb9b286f
3 changed files with 6 additions and 3 deletions
1
AUTHORS
1
AUTHORS
|
@ -115,6 +115,7 @@ Nick Pelling (nickpelling)
|
||||||
Nicklas Persson (NicklasPersson)
|
Nicklas Persson (NicklasPersson)
|
||||||
Niklas Fiekas (niklasf)
|
Niklas Fiekas (niklasf)
|
||||||
Nikolay Kostov (NikolayIT)
|
Nikolay Kostov (NikolayIT)
|
||||||
|
Nguyen Pham
|
||||||
Ondrej Mosnáček (WOnder93)
|
Ondrej Mosnáček (WOnder93)
|
||||||
Oskar Werkelin Ahlin
|
Oskar Werkelin Ahlin
|
||||||
Pablo Vazquez
|
Pablo Vazquez
|
||||||
|
|
|
@ -56,8 +56,9 @@ const std::string Bitboards::pretty(Bitboard b) {
|
||||||
for (File f = FILE_A; f <= FILE_H; ++f)
|
for (File f = FILE_A; f <= FILE_H; ++f)
|
||||||
s += b & make_square(f, r) ? "| X " : "| ";
|
s += b & make_square(f, r) ? "| X " : "| ";
|
||||||
|
|
||||||
s += "|\n+---+---+---+---+---+---+---+---+\n";
|
s += "| " + std::to_string(1 + r) + "\n+---+---+---+---+---+---+---+---+\n";
|
||||||
}
|
}
|
||||||
|
s += " a b c d e f g h\n";
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,11 @@ std::ostream& operator<<(std::ostream& os, const Position& pos) {
|
||||||
for (File f = FILE_A; f <= FILE_H; ++f)
|
for (File f = FILE_A; f <= FILE_H; ++f)
|
||||||
os << " | " << PieceToChar[pos.piece_on(make_square(f, r))];
|
os << " | " << PieceToChar[pos.piece_on(make_square(f, r))];
|
||||||
|
|
||||||
os << " |\n +---+---+---+---+---+---+---+---+\n";
|
os << " | " << (1 + r) << "\n +---+---+---+---+---+---+---+---+\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase
|
os << " a b c d e f g h\n"
|
||||||
|
<< "\nFen: " << pos.fen() << "\nKey: " << std::hex << std::uppercase
|
||||||
<< std::setfill('0') << std::setw(16) << pos.key()
|
<< std::setfill('0') << std::setw(16) << pos.key()
|
||||||
<< std::setfill(' ') << std::dec << "\nCheckers: ";
|
<< std::setfill(' ') << std::dec << "\nCheckers: ";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue