From: Fabian Fichter Date: Wed, 25 Dec 2019 11:33:00 +0000 (+0100) Subject: Generalize sittuyin promotion X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=70a42eeb0b728692838bdf54fff27eaa7497bf67;p=fairystockfish.git Generalize sittuyin promotion No functional change. --- 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;