X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=9f694a79b25828a476f9aad6b776c95db727981a;hp=e6b072bc82dd2dda20d9b199a2282de0b911ba73;hb=ca3c1c5f3a5f011edd04af856cdd59bdaefe423d;hpb=f233ca1af4d36ded8ce924131f42bc4d0093ec6e diff --git a/src/position.h b/src/position.h index e6b072bc..9f694a79 100644 --- a/src/position.h +++ b/src/position.h @@ -171,6 +171,9 @@ public: // Used by NNUE StateInfo* state() const; + void put_piece(Piece pc, Square s); + void remove_piece(Square s); + private: // Initialization helpers (used while setting up a position) void set_castling_right(Color c, Square rfrom); @@ -178,8 +181,6 @@ private: void set_check_info(StateInfo* si) const; // Other helpers - void put_piece(Piece pc, Square s); - void remove_piece(Square s); void move_piece(Square from, Square to); template void do_castling(Color us, Square from, Square& to, Square& rfrom, Square& rto); @@ -386,7 +387,7 @@ inline void Position::remove_piece(Square s) { byTypeBB[ALL_PIECES] ^= s; byTypeBB[type_of(pc)] ^= s; byColorBB[color_of(pc)] ^= s; - /* board[s] = NO_PIECE; Not needed, overwritten by the capturing one */ + board[s] = NO_PIECE; pieceCount[pc]--; pieceCount[make_piece(color_of(pc), ALL_PIECES)]--; psq -= PSQT::psq[pc][s];