From 8d90214e278c27dbf72b24383ac9e3ad24d54a27 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 8 Dec 2018 21:58:46 +0100 Subject: [PATCH] Exercise UCCI option 'newgame' also after 'isready' handshake The patch that moved the sending of 'ucinewgame' to after the initial 'isready' handshake overlooked that this was actually the else-clause of an if-statement that emitted 'option newgame' for UCCI. Now it is not really clear when the latter should be emitted, as it seems to be ignored even in Elephant Eye, but treating it as a variant of 'ucinewgame' seems best. Accidentally the statement behind it did not suffer from being in the else-clause, as it processed the UCI_Variant option, which does not exist in UCCI anyway. --- UCI2WB.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index ad897f5..1cb0a16 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -542,10 +542,10 @@ DoCommand () if(memory != oldMem && hasHash) EPRINT((f, "# setoption %s%s %s%d\n", nameWord, hashOpt, valueWord, memory)) oldMem = memory; // we can set other options here - if(sc == 'x') { if(newGame) EPRINT((f, "# setoption newgame\n")) } else // optional in UCCI if(varOpt) EPRINT((f, "# setoption name UCI_Variant value chess\n")) EPRINT((f, "# isready\n")) fflush(toE); HandleEngineOutput(); // wait for readyok + if(sc == 'x') { if(newGame) EPRINT((f, "# setoption newgame\n")) } else // optional in UCCI EPRINT((f, "# u%cinewgame\n", sc)) fflush(toE); } else if(!strcmp(command, "option")) { -- 1.7.0.4