From bc0628d5ac92e6d7a5c86df1a062b70c05b07c44 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 11 Oct 2010 20:52:10 +0200 Subject: [PATCH] Add option -variations to control variation-tree walking Just so that users can switch it off if the find it annoying. --- args.h | 1 + backend.c | 3 ++- common.h | 1 + 3 files changed, 4 insertions(+), 1 deletions(-) diff --git a/args.h b/args.h index bd142ad..fe9c7bc 100644 --- a/args.h +++ b/args.h @@ -185,6 +185,7 @@ ArgDescriptor argDescriptors[] = { { "fd", ArgFilename, (void *) &appData.firstDirectory, FALSE, INVALID }, { "secondDirectory", ArgFilename, (void *) &appData.secondDirectory, FALSE, (ArgIniType) SECOND_DIRECTORY }, { "sd", ArgFilename, (void *) &appData.secondDirectory, FALSE, INVALID }, + { "variations", ArgBoolean, (void *) &appData.variations, TRUE, (ArgIniType) FALSE }, /* some options only used by the XBoard front end, and ignored in WinBoard */ /* Their saving is controlled by XBOARD, which in WinBoard is defined as FALSE */ diff --git a/backend.c b/backend.c index 6bd4418..94f7bee 100644 --- a/backend.c +++ b/backend.c @@ -6161,7 +6161,8 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar) the previous line in Analysis Mode */ if ((gameMode == AnalyzeMode || gameMode == EditGame) && currentMove < forwardMostMove) { - PushTail(currentMove, forwardMostMove); // [HGM] vari: save tail of game + if(appData.variations) PushTail(currentMove, forwardMostMove); // [HGM] vari: save tail of game + else forwardMostMove = currentMove; } /* If we need the chess program but it's dead, restart it */ diff --git a/common.h b/common.h index 4f78597..aa46600 100644 --- a/common.h +++ b/common.h @@ -523,6 +523,7 @@ typedef struct { int secondProtocolVersion; Boolean showButtonBar; Boolean icsEngineAnalyze; + Boolean variations; /* [HGM] enable variation-tree walking */ /* [AS] New properties (down to the "ZIPPY" part) */ Boolean firstScoreIsAbsolute; /* If true, engine score is always from white side */ -- 1.7.0.4