- board[s] = make_piece(c, pt);
- byTypeBB[ALL_PIECES] |= s;
- byTypeBB[pt] |= s;
- byColorBB[c] |= s;
- index[s] = pieceCount[c][pt]++;
- pieceList[c][pt][index[s]] = s;
- pieceCount[c][ALL_PIECES]++;
+ board[s] = pc;
+ byTypeBB[ALL_PIECES] |= byTypeBB[type_of(pc)] |= s;
+ byColorBB[color_of(pc)] |= s;
+ index[s] = pieceCount[pc]++;
+ pieceList[pc][index[s]] = s;
+ pieceCount[make_piece(color_of(pc), ALL_PIECES)]++;
+ psq += PSQT::psq[pc][s];