mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Use existing function for removing and placing a piece.
Passed non-regression STC: ``` LLR: 3.33 (-2.94,2.94) <-1.75,0.25> Total: 359712 W: 93077 L: 93175 D: 173460 Ptnml(0-2): 1088, 39816, 98144, 39722, 1086 ``` https://tests.stockfishchess.org/tests/view/69af5e9a6b61ccc788710e31 closes https://github.com/official-stockfish/Stockfish/pull/6667 No functional change
This commit is contained in:
committed by
Disservin
parent
e38f5b2f53
commit
e093339c2f
+1
-2
@@ -1124,9 +1124,8 @@ void Position::undo_move(Move m) {
|
||||
assert(type_of(pc) == m.promotion_type());
|
||||
assert(type_of(pc) >= KNIGHT && type_of(pc) <= QUEEN);
|
||||
|
||||
remove_piece(to);
|
||||
pc = make_piece(us, PAWN);
|
||||
put_piece(pc, to);
|
||||
swap_piece(to, pc);
|
||||
}
|
||||
|
||||
if (m.type_of() == CASTLING)
|
||||
|
||||
Reference in New Issue
Block a user