From: H.G. Muller Date: Fri, 25 Jan 2013 08:55:56 +0000 (+0100) Subject: Stalemate is a win in Shogi X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1fbfb851ce740e380fa9a16eb07fe1465af479fa;p=xboard.git Stalemate is a win in Shogi In regular Shogi this never occurs, but in the mini variants it happens often enough. --- diff --git a/backend.c b/backend.c index 422bdb9..aafb11f 100644 --- a/backend.c +++ b/backend.c @@ -7757,7 +7757,7 @@ Adjudicate (ChessProgramState *cps) boards[forwardMostMove][EP_STATUS] = nrW == nrB ? EP_STALEMATE : ((nrW < nrB) != WhiteOnMove(forwardMostMove) ? EP_CHECKMATE : EP_WINS); - else if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantXiangqi) + else if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantXiangqi || gameInfo.variant == VariantShogi) boards[forwardMostMove][EP_STATUS] = EP_CHECKMATE; // and in these variants being stalemated loses } break; diff --git a/moves.c b/moves.c index 2b6fd8a..d59542a 100644 --- a/moves.c +++ b/moves.c @@ -1264,7 +1264,7 @@ MateTest (Board board, int flags) else if(gameInfo.variant == VariantGiveaway) return MT_STEALMATE; // no check exists, stalemated = win return inCheck ? MT_CHECKMATE - : (gameInfo.variant == VariantXiangqi || gameInfo.variant == VariantShatranj) ? + : (gameInfo.variant == VariantXiangqi || gameInfo.variant == VariantShatranj || gameInfo.variant == VariantShogi) ? MT_STAINMATE : MT_STALEMATE; } }