From 020c74aecce8f891f25142788eafa98e665379d2 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 18 Sep 2014 23:30:09 +0200 Subject: [PATCH] Allow two Pawns per file in Tori Shogi When the board has 7 ranks it is assumed to be Tori Shogi, and the requirement for maximally one Pawn per file is relaxed to two. --- moves.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moves.c b/moves.c index 2e772e1..f780f85 100644 --- a/moves.c +++ b/moves.c @@ -1530,9 +1530,9 @@ if(appData.debugMode) fprintf(debugFP, "LegalDrop: %d @ %d,%d)\n", piece, ft, rt piece == WhiteKnight && rt > BOARD_HEIGHT-3 || piece == BlackKnight && rt < 2 ) return IllegalMove; // e.g. where dropped piece has no moves if(piece == WhitePawn || piece == BlackPawn) { - int r; + int r, max = 1 + (BOARD_HEIGHT == 7); // two Pawns per file in Tori! for(r=1; r