+ if (Eval::useNNUE)
+ {
+ PieceId dp0, dp1;
+ auto& dp = st->dirtyPiece;
+ dp.dirty_num = 2; // 2 pieces moved
+
+ if (Do)
+ {
+ dp0 = piece_id_on(from);
+ dp1 = piece_id_on(rfrom);
+ dp.pieceId[0] = dp0;
+ dp.old_piece[0] = evalList.piece_with_id(dp0);
+ evalList.put_piece(dp0, to, make_piece(us, KING));
+ dp.new_piece[0] = evalList.piece_with_id(dp0);
+ dp.pieceId[1] = dp1;
+ dp.old_piece[1] = evalList.piece_with_id(dp1);
+ evalList.put_piece(dp1, rto, make_piece(us, ROOK));
+ dp.new_piece[1] = evalList.piece_with_id(dp1);
+ }
+ else
+ {
+ dp0 = piece_id_on(to);
+ dp1 = piece_id_on(rto);
+ evalList.put_piece(dp0, from, make_piece(us, KING));
+ evalList.put_piece(dp1, rfrom, make_piece(us, ROOK));
+ }
+ }
+