From 1f508cfef32d91d668bdac6a0d9ad303012ae46d Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 21 Sep 2016 14:26:07 +0200 Subject: [PATCH] Handle USI win claims USI engines can emit 'bestmove win' to claim a win, e.g. because of the point count in an impasse situation. This is traslated to a CECP result claim in favor of the side to move, with REASON "claim". --- UCI2WB.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index c3129f5..459c748 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -251,6 +251,7 @@ Engine2GUI() // move was a move to be played if(p = strstr(line+8, " draw")) *p = 0, printf("offer draw\n"); // UCCI if(strstr(line+9, "resign")) { printf("resign\n"); computer = NONE; } + if(strstr(line+9, "win")) { printf("%s {claim}\n", stm== WHITE ? "1-0" :"0-1"); computer = NONE; } // USI if(strstr(line+9, "(none)") || strstr(line+9, "null") || strstr(line+9, "0000")) { printf("%s\n", lastScore < -99999 ? "resign" : "1/2-1/2 {stalemate}"); computer = NONE; } sscanf(line, "bestmove %s", move[moveNr++]); -- 1.7.0.4