mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Faster Position::move_is_capture() condition
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
46bb6c6dc3
commit
6176357ac1
1 changed files with 1 additions and 4 deletions
|
@ -722,10 +722,7 @@ inline bool Position::move_is_capture(Move m) const {
|
|||
|
||||
// Move must not be MOVE_NONE !
|
||||
|
||||
return ( !square_is_empty(move_to(m))
|
||||
&& (color_of_piece_on(move_to(m)) != color_of_piece_on(move_from(m)))
|
||||
)
|
||||
|| move_is_ep(m);
|
||||
return (!square_is_empty(move_to(m)) && !move_is_castle(m)) || move_is_ep(m);
|
||||
}
|
||||
|
||||
#endif // !defined(POSITION_H_INCLUDED)
|
||||
|
|
Loading…
Add table
Reference in a new issue