From 6a01db395768f122d5810b585a89a678a1018d17 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 23 Oct 2014 21:23:14 +0200 Subject: [PATCH] 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. --- moves.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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!) -- 1.7.0.4