Introduce and use same_color_squares()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-07-25 11:05:01 +01:00
parent a84e4b2049
commit 9b1d5bd534
4 changed files with 16 additions and 11 deletions

View File

@@ -400,7 +400,7 @@ void Position::print(Move move) const {
char c = (color_of_piece_on(sq) == BLACK ? '=' : ' ');
Piece piece = piece_on(sq);
if (piece == EMPTY && square_color(sq) == BLACK)
if (piece == EMPTY && same_color_squares(sq, SQ_A1))
piece = EMPTY_BLACK_SQ;
cout << c << pieceLetters.from_piece(piece) << c << '|';