From: H.G.Muller Date: Thu, 23 Oct 2014 19:23:14 +0000 (+0200) Subject: Also do dual-royal test in variant shogi X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=6a01db395768f122d5810b585a89a678a1018d17 Also do dual-royal test in variant shogi For the benefit of Sho Shogi we also have to be prepared to find a Crown Prince in variant shogi, so it can be used as a parent variant for Sho Shogi with legality testing on. --- diff --git a/moves.c b/moves.c index 318215a..4a097df 100644 --- a/moves.c +++ b/moves.c @@ -1620,8 +1620,9 @@ CheckTest (Board board, int flags, int rf, int ff, int rt, int ft, int enPassant king = flags & F_WHITE_ON_MOVE ? WhiteWazir : BlackWazir; if(gameInfo.variant == VariantKnightmate) king = flags & F_WHITE_ON_MOVE ? WhiteUnicorn : BlackUnicorn; - if(gameInfo.variant == VariantChu) { // strictly speaking this is not needed, as Chu officially has no check + if(gameInfo.variant == VariantChu || gameInfo.variant == VariantShogi) { // strictly speaking this is not needed, as Chu officially has no check int r, f, k = king, royals=0, prince = flags & F_WHITE_ON_MOVE ? WhiteMonarch : BlackMonarch; + if(gameInfo.variant == VariantShogi) prince -= 11; // White/BlackFalcon for(r=0; r 1) return FALSE; // no check if we have two royals (ignores double captureby Lion!)