The legality test in variant seirawan normally tests if a piece specified
for gating is indeed in hand. This is now suppressed if there are no
holdings. There is no check on the correctness of the indicated gating
piece at all now, in that case. But presence of the suffix is still
necessary to trigger the gating of the piece that should be gated.
if(promoChar == 'x') promoChar = NULLCHAR; // [HGM] is this ever the case?
if(autoProm[piece]) promoChar = NULLCHAR; // ignore promotion characters on auto-promoting pieces
if(gameInfo.variant == VariantSChess && promoChar && promoChar != '=' && board[rf][ff] != WhitePawn && board[rf][ff] != BlackPawn) {
+ if(gameInfo.holdingsSize) {
if(board[rf][ff] < BlackPawn) { // white
if(rf != 0) return IllegalMove; // must be on back rank
if(!(board[VIRGIN][ff] & VIRGIN_W)) return IllegalMove; // non-virgin
if(cl.kind == BlackHSideCastleFR && (ff == BOARD_RGHT-2 || ff == BOARD_RGHT-3)) return ImpossibleMove;
if(cl.kind == BlackASideCastleFR && (ff == BOARD_LEFT+2 || ff == BOARD_LEFT+3)) return ImpossibleMove;
}
+ }
} else
if(gameInfo.variant == VariantChu) {
if(cl.kind != NormalMove || promoChar == NULLCHAR || promoChar == '=') return cl.kind;