projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ee0f5eb
)
Consistent capture_or_promotion for special moves
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 26 Oct 2019 19:24:02 +0000 (21:24 +0200)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 26 Oct 2019 19:24:02 +0000 (21:24 +0200)
No functional change except for cambodian, micro, and kyotoshogi.
src/position.h
patch
|
blob
|
history
diff --git
a/src/position.h
b/src/position.h
index
3de568e
..
19970bd
100644
(file)
--- a/
src/position.h
+++ b/
src/position.h
@@
-844,7
+844,7
@@
inline bool Position::is_chess960() const {
inline bool Position::capture_or_promotion(Move m) const {
assert(is_ok(m));
- return type_of(m) != NORMAL && type_of(m) != PIECE_PROMOTION ? type_of(m) != DROP && type_of(m) != CASTLING : !empty(to_sq(m));
+ return type_of(m) == PROMOTION || type_of(m) == ENPASSANT || (type_of(m) != CASTLING && !empty(to_sq(m)));
}
inline bool Position::capture(Move m) const {