From aa57fb93f94bdacfdbe92bf259fa5cc2885802a0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 26 Nov 2010 10:10:55 +0100 Subject: [PATCH] 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. --- moves.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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 ) ) -- 1.7.0.4