From d2a7786025d6bdb8cbd7e3b38a068185d2f93222 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 19 Nov 2010 23:10:35 +0100 Subject: [PATCH] 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. --- backend.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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; -- 1.7.0.4