Better condition in is_pseudo_legal()

Simplify occupied destination condition.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Reuven Peleg
2013-07-22 13:47:59 +03:00
committed by Marco Costalba
parent c45c6d308f
commit 1cc18d8a7a

View File

@@ -542,7 +542,7 @@ bool Position::is_pseudo_legal(const Move m) const {
return false;
// The destination square cannot be occupied by a friendly piece
if (piece_on(to) != NO_PIECE && color_of(piece_on(to)) == us)
if (pieces(us) & to)
return false;
// Handle the special case of a pawn move