From 1426e13849d5d89aff83863336431a54b6fd8601 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 30 Dec 2012 14:58:16 +0100 Subject: [PATCH] Implement aborting of games on engine request. A new game-end command is added. For bakward compatibility it is disguised as an old one, namely "1/2-1/2 {Engine Abort Request}". These resultDetails are recognized as special, and rather than ending the game in a draw (which GUIs not implementing this), the game will be completely 'expunged' from the match or tourney it is part of, leaving no trace in the saveGameFile. --- backend.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index 25134bf..3ab07f9 100644 --- a/backend.c +++ b/backend.c @@ -10632,6 +10632,10 @@ GameEnds (ChessMove result, char *resultDetails, int whosays) resultDetails = buf; } /* (Claiming a loss is accepted no questions asked!) */ + } else if(matchMode && result == GameIsDrawn && !strcmp(resultDetails, "Engine Abort Request")) { + forwardMostMove = backwardMostMove; // [HGM] delete game to surpress saving + result = GameUnfinished; + if(!*appData.tourneyFile) matchGame--; // replay even in plain match } /* [HGM] bare: don't allow bare King to win */ if((gameInfo.holdingsWidth == 0 || gameInfo.variant == VariantSuper -- 1.7.0.4