Change piece_attacks_square() API

An extra argument let us simplify some code.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-02-17 12:00:05 +01:00
parent 9f5b709db7
commit 7013efce4e
4 changed files with 6 additions and 19 deletions

View File

@@ -2113,7 +2113,7 @@ namespace {
// Case 4: The destination square for m2 is attacked by the moving piece
// in m1:
if(pos.piece_attacks_square(t1, t2))
if(pos.piece_attacks_square(pos.piece_on(t1), t1, t2))
return true;
// Case 5: Discovered check, checking piece is the piece moved in m1: