From 70a42eeb0b728692838bdf54fff27eaa7497bf67 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Wed, 25 Dec 2019 12:33:00 +0100 Subject: [PATCH] Generalize sittuyin promotion No functional change. --- src/movegen.cpp | 2 +- src/variant.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/movegen.cpp b/src/movegen.cpp index e0b0377..119c205 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -191,7 +191,7 @@ namespace { Square from = pop_lsb(&pawns); for (PieceType pt : pos.promotion_piece_types()) { - if (pos.count(Us, pt)) + if (pos.promotion_limit(pt) && pos.promotion_limit(pt) <= pos.count(Us, pt)) continue; Bitboard b = (pos.attacks_from(Us, pt, from) & ~pos.pieces()) | from; if (Type == EVASIONS) diff --git a/src/variant.cpp b/src/variant.cpp index f02c826..1d9ce18 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -296,6 +296,7 @@ namespace { v->sittuyinRookDrop = true; v->promotionRank = RANK_1; // no regular promotions v->sittuyinPromotion = true; + v->promotionLimit[FERS] = 1; v->immobilityIllegal = false; v->countingRule = ASEAN_COUNTING; v->nMoveRule = 50; -- 1.7.0.4