From: H.G. Muller Date: Fri, 19 Nov 2010 22:10:35 +0000 (+0100) Subject: Make Hoplite moves irreversible in Spartan Chess X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d2a7786025d6bdb8cbd7e3b38a068185d2f93222;hp=020fc338d749be0f8f49d133911a6c33d2eb56a1;p=xboard.git Make Hoplite moves irreversible in Spartan Chess Consider Lance moves in variant Fairy (where the Lance represents the Spartan Hoplite Pawn) as Pawn moves, so they reset the 50-move counter. --- diff --git a/backend.c b/backend.c index 6913020..361fb86 100644 --- a/backend.c +++ b/backend.c @@ -8419,6 +8419,9 @@ ApplyMove(fromX, fromY, toX, toY, promoChar, board) } else { int i; + if( board[fromY][fromX] == WhiteLance || board[fromY][fromX] == BlackLance ) { + if( gameInfo.variant == VariantFairy ) board[EP_STATUS] = EP_PAWN_MOVE; // Lance in fairy is Pawn-like + } else if( board[fromY][fromX] == WhitePawn ) { if(fromY != toY) // [HGM] Xiangqi sideway Pawn moves should not count as 50-move breakers board[EP_STATUS] = EP_PAWN_MOVE;