projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c45c6d3
)
Better condition in is_pseudo_legal()
author
Reuven Peleg
<reuvenpe2005@gmail.com>
Mon, 22 Jul 2013 10:47:59 +0000
(13:47 +0300)
committer
Marco Costalba
<mcostalba@gmail.com>
Mon, 22 Jul 2013 18:02:31 +0000
(20:02 +0200)
Simplify occupied destination condition.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
patch
|
blob
|
history
diff --git
a/src/position.cpp
b/src/position.cpp
index 55f8bcff5cd960bbcb4234e72e4d4fd8900f9d10..f7a89e07f3d88afacdf7f6ae18b80a706834d77e 100644
(file)
--- a/
src/position.cpp
+++ b/
src/position.cpp
@@
-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 (piece
s(us) & to
)
return false;
// Handle the special case of a pawn move