Make Hoplite moves irreversible in Spartan Chess
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 19 Nov 2010 22:10:35 +0000 (23:10 +0100)
committerArun Persaud <arun@nubati.net>
Sun, 21 Nov 2010 00:07:53 +0000 (16:07 -0800)
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

index 6913020..361fb86 100644 (file)
--- 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;