From d22aa698a5c509b3b995f26cfb72249af3129a9b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 14 Jun 2016 11:07:29 +0200 Subject: [PATCH] Supply time and node count for engines that do not give it By default thinking time and nodecount were set to 0, but this made XBoard interpret Thinking Output with score 0 as an info string, which was undesirable. So the node count is now 1 by default, while the time could be measured by UCI2WB itself (as it was already recoding startTime of all searches). --- UCI2WB.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index 145a96c..29d4040 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -271,7 +271,7 @@ Engine2GUI() if(lastScore == 100001 && iniPos[0] != 'f') { printf("%s {mate}\n", stm == BLACK ? "1-0" : "0-1"); computer = NONE; } } else if(!strcmp(command, "info")) { - int d=0, s=0, t=0, n=0; + int d=0, s=0, t=(GetTickCount() - startTime)/10, n=1; char *pv; if(sscanf(line+5, "string times @ %c", &dummy) == 1) { printf("# %s", line+12); continue; } if(collect && (pv = strstr(line+5, "currmove "))) { -- 1.7.0.4