1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00

Retire test for king moves in see()

We already test this condition in see_sign() and
so it is almost always a redundant verification.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2011-05-17 12:24:06 +02:00
parent ad0fdf0da6
commit e444e18d2b

View file

@ -1519,11 +1519,6 @@ int Position::see(Move m) const {
from = move_from(m); from = move_from(m);
to = move_to(m); to = move_to(m);
capturedType = type_of_piece_on(to); capturedType = type_of_piece_on(to);
// King cannot be recaptured
if (capturedType == KING)
return seeValues[capturedType];
occupied = occupied_squares(); occupied = occupied_squares();
// Handle en passant moves // Handle en passant moves