X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=391e556879c14081139dddcc721de89cf46b1649;hp=879e96904a89314fc97e95b199f5795c56ff974d;hb=f40e481fd63d056cbdad78c2c3fcdad0ff3556d9;hpb=6b6f3c4ca47cdb39bea9f9b39b5f8ed80f5198a9 diff --git a/src/position.cpp b/src/position.cpp index 879e9690..391e5568 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -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 == NO_PIECE && same_color_squares(sq, SQ_A1)) + if (piece == NO_PIECE && square_color(sq) == DARK) piece = NO_PIECE_DARK_SQ; cout << c << pieceLetters.from_piece(piece) << c << '|'; @@ -1505,6 +1505,7 @@ void Position::clear() { st = &startState; memset(st, 0, sizeof(StateInfo)); st->epSquare = SQ_NONE; + startPosPlyCounter = 0; memset(byColorBB, 0, sizeof(Bitboard) * 2); memset(byTypeBB, 0, sizeof(Bitboard) * 8); @@ -1539,6 +1540,10 @@ void Position::reset_game_ply() { st->gamePly = 0; } +void Position::inc_startpos_ply_counter() { + + startPosPlyCounter++; +} /// Position::put_piece() puts a piece on the given square of the board, /// updating the board array, bitboards, and piece counts.