]> git.sesse.net Git - stockfish/commitdiff
Revert see shortcut when only one attacker
authorMarco Costalba <mcostalba@gmail.com>
Sun, 26 Oct 2008 13:50:15 +0000 (14:50 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 26 Oct 2008 20:30:21 +0000 (21:30 +0100)
It does not seem to work after a little testing.

Perhaps it works on the long terms, but it is also
ugly because not correct, so revert for now.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp

index 67ee145c11efecb3500a26843db96ff1acf9c354..5e0924830740a81a4b09262ac433b9f425d41fbd 100644 (file)
@@ -1633,13 +1633,6 @@ int Position::see(Square from, Square to) const {
 
   attackers &= occ; // Remove the moving piece
 
 
   attackers &= occ; // Remove the moving piece
 
-  // If we don't have any attacker but the moving piece (common case)
-  // then we loose our piece and gain the opponent attacked one.
-  // Note that this is not perfect! It does not detect x-rays of
-  // an our piece behind an opposite one. But is a very rare case.
-  if ((attackers & pieces_of_color(us)) == EmptyBoardBB)
-      return seeValues[capture] - seeValues[piece];
-
   // The destination square is defended, which makes things rather more
   // difficult to compute. We proceed by building up a "swap list" containing
   // the material gain or loss at each stop in a sequence of captures to the
   // The destination square is defended, which makes things rather more
   // difficult to compute. We proceed by building up a "swap list" containing
   // the material gain or loss at each stop in a sequence of captures to the