Handle non-capturing piece promotions as quiet moves
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 28 Nov 2018 13:54:58 +0000 (14:54 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 28 Nov 2018 13:54:58 +0000 (14:54 +0100)
shogi
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2156 W: 1104 L: 974 D: 78

minishogi
LLR: 1.13 (-2.94,2.94) [0.00,10.00]
Total: 2500 W: 1181 L: 1109 D: 210

Functional change only for shogi variants.

src/position.h

index 2c621b5..350b9c9 100644 (file)
@@ -763,7 +763,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) != DROP && type_of(m) != CASTLING : !empty(to_sq(m));
+  return type_of(m) != NORMAL && type_of(m) != PIECE_PROMOTION ? type_of(m) != DROP && type_of(m) != CASTLING : !empty(to_sq(m));
 }
 
 inline bool Position::capture(Move m) const {