From: H.G. Muller Date: Fri, 26 Nov 2010 09:10:55 +0000 (+0100) Subject: Restrict drops in variant seirawan to back rank X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=aa57fb93f94bdacfdbe92bf259fa5cc2885802a0;p=xboard.git Restrict drops in variant seirawan to back rank Drops aren't really llowed at all in Seirawan Ches, but there exists an engine that supports a variant where drops on the back-rank are allowed. --- diff --git a/moves.c b/moves.c index 6fa6693..6ccbb1c 100644 --- a/moves.c +++ b/moves.c @@ -1043,6 +1043,8 @@ if(appData.debugMode) fprintf(debugFP, "LegalDrop: %d @ %d,%d)\n", piece, ft, rt if(board[r][ft] == piece) return IllegalMove; // or there already is a Pawn in file // should still test if we mate with this Pawn } + } else if(gameInfo.variant == VariantSChess) { // only back-rank drops + if (rt != (piece < BlackPawn ? 0 : BOARD_HEIGHT-1)) return IllegalMove; } else { if( (piece == WhitePawn || piece == BlackPawn) && (rt == 0 || rt == BOARD_HEIGHT -1 ) )