From 18ccb0da4151e649009780bd4db7ecbdea7a93c8 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 24 Jan 2010 17:29:42 +0100 Subject: [PATCH] Also adjudicate after user move Call Adjudicate() in FinishMove(). --- backend.c | 3 +++ winboard/winboard.rc | 2 +- xoptions.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 0a7df47..8b6d3c5 100644 --- a/backend.c +++ b/backend.c @@ -167,6 +167,7 @@ int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY, /*char*/int promoChar)); void BackwardInner P((int target)); void ForwardInner P((int target)); +int Adjudicate P((ChessProgramState *cps)); void GameEnds P((ChessMove result, char *resultDetails, int whosays)); void EditPositionDone P((Boolean fakeRights)); void PrintOpponents P((FILE *fp)); @@ -5577,6 +5578,8 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar) MakeMove(fromX, fromY, toX, toY, promoChar); /*updates forwardMostMove*/ + if(Adjudicate(NULL)) return 1; // [HGM] adjudicate: take care of automtic game end + if (gameMode == BeginningOfGame) { if (appData.noChessProgram) { gameMode = EditGame; diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 428e1c4..a2e9a96 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -857,7 +857,7 @@ BEGIN CONTROL "Periodic Updates (for Analysis Mode)", IDC_EpPeriodicUpdates,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,40,131,10 - GROUPBOX "Engine-engine matches",IDC_STATIC,4,56,200,98 + GROUPBOX "Adjudications in non-ICS games",IDC_STATIC,4,56,200,98 LTEXT "Adjudicate draw after:",IDC_STATIC,10,72,70,8 EDITTEXT IDC_EpDrawMoveCount,116,68,40,14,ES_AUTOHSCROLL LTEXT "moves",IDC_STATIC,158,72,22,8 diff --git a/xoptions.c b/xoptions.c index 8bbacfd..e31aa33 100644 --- a/xoptions.c +++ b/xoptions.c @@ -747,7 +747,7 @@ void EnginePopUp() XtSetArg(args[j-3], XtNstate, appData.secondScoreIsAbsolute); w4 = XtCreateManagedWidget(_("Engine #2 Score is Absolute"), toggleWidgetClass, form, args, j); - s1 = XtCreateManagedWidget(_("\nEngine-Engine Adjudications:"), labelWidgetClass, form, args, 3); + s1 = XtCreateManagedWidget(_("\nAdjudications in non-ICS games:"), labelWidgetClass, form, args, 3); XtSetArg(args[j-1], XtNfromVert, (XtArgVal) s1); XtSetArg(args[j-3], XtNstate, appData.testClaims); -- 1.7.0.4