From: H.G.Muller Date: Sat, 8 Dec 2018 20:58:46 +0000 (+0100) Subject: Exercise UCCI option 'newgame' also after 'isready' handshake X-Git-Tag: v4.0~6 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8d90214e278c27dbf72b24383ac9e3ad24d54a27;p=uci2wb.git 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. --- 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")) {