mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Fix move_is_capture() definition
The structure of move is changed so should also the two functions. It happens that it works by accident ! Bug spotted by Marek Kwiatkowski No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e444e18d2b
commit
85d1f9c5ec
1 changed files with 2 additions and 2 deletions
|
@ -527,13 +527,13 @@ inline bool Position::is_chess960() const {
|
|||
inline bool Position::move_is_capture(Move m) const {
|
||||
|
||||
assert (m != MOVE_NONE && m != MOVE_NULL);
|
||||
return (m & (3 << 15)) ? !move_is_castle(m) : !square_is_empty(move_to(m));
|
||||
return !square_is_empty(move_to(m)) || move_is_ep(m);
|
||||
}
|
||||
|
||||
inline bool Position::move_is_capture_or_promotion(Move m) const {
|
||||
|
||||
assert (m != MOVE_NONE && m != MOVE_NULL);
|
||||
return (m & (0x1F << 12)) ? !move_is_castle(m) : !square_is_empty(move_to(m));
|
||||
return move_is_capture(m) || move_is_promotion(m);
|
||||
}
|
||||
|
||||
inline PieceType Position::captured_piece_type() const {
|
||||
|
|
Loading…
Add table
Reference in a new issue