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

@@ -539,7 +539,7 @@ bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
}
// Luckly we can handle all the other pieces in one go
return ( pos.piece_attacks_square(from, to)
return ( pos.piece_attacks_square(pos.piece_on(from), from, to)
&& pos.pl_move_is_legal(m, pinned)
&& !move_promotion(m));
}