mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
Don't update pieceCount for ALL_PIECES
It is currently unused and only adds overhead for nothing. Also set proper type of chess960. No functional change.
This commit is contained in:
parent
7b0a2f2a90
commit
64a71c3c02
1 changed files with 1 additions and 3 deletions
|
@ -206,7 +206,7 @@ private:
|
||||||
Color sideToMove;
|
Color sideToMove;
|
||||||
Thread* thisThread;
|
Thread* thisThread;
|
||||||
StateInfo* st;
|
StateInfo* st;
|
||||||
int chess960;
|
bool chess960;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline uint64_t Position::nodes_searched() const {
|
inline uint64_t Position::nodes_searched() const {
|
||||||
|
@ -403,7 +403,6 @@ inline void Position::put_piece(Square s, Color c, PieceType pt) {
|
||||||
byTypeBB[ALL_PIECES] |= s;
|
byTypeBB[ALL_PIECES] |= s;
|
||||||
byTypeBB[pt] |= s;
|
byTypeBB[pt] |= s;
|
||||||
byColorBB[c] |= s;
|
byColorBB[c] |= s;
|
||||||
pieceCount[c][ALL_PIECES]++;
|
|
||||||
index[s] = pieceCount[c][pt]++;
|
index[s] = pieceCount[c][pt]++;
|
||||||
pieceList[c][pt][index[s]] = s;
|
pieceList[c][pt][index[s]] = s;
|
||||||
}
|
}
|
||||||
|
@ -432,7 +431,6 @@ inline void Position::remove_piece(Square s, Color c, PieceType pt) {
|
||||||
byTypeBB[pt] ^= s;
|
byTypeBB[pt] ^= s;
|
||||||
byColorBB[c] ^= s;
|
byColorBB[c] ^= s;
|
||||||
/* board[s] = NO_PIECE; */ // Not needed, will be overwritten by capturing
|
/* board[s] = NO_PIECE; */ // Not needed, will be overwritten by capturing
|
||||||
pieceCount[c][ALL_PIECES]--;
|
|
||||||
Square lastSquare = pieceList[c][pt][--pieceCount[c][pt]];
|
Square lastSquare = pieceList[c][pt][--pieceCount[c][pt]];
|
||||||
index[lastSquare] = index[s];
|
index[lastSquare] = index[s];
|
||||||
pieceList[c][pt][index[lastSquare]] = lastSquare;
|
pieceList[c][pt][index[lastSquare]] = lastSquare;
|
||||||
|
|
Loading…
Add table
Reference in a new issue