Exercise UCCI option 'newgame' also after 'isready' handshake
[uci2wb.git] / UCI2WB.c
index ad897f5..1cb0a16 100644 (file)
--- 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))\r
            oldMem = memory;\r
            // we can set other options here\r
-           if(sc == 'x') { if(newGame) EPRINT((f, "# setoption newgame\n")) } else // optional in UCCI\r
            if(varOpt) EPRINT((f, "# setoption name UCI_Variant value chess\n"))\r
            EPRINT((f, "# isready\n")) fflush(toE);\r
            HandleEngineOutput(); // wait for readyok\r
+           if(sc == 'x') { if(newGame) EPRINT((f, "# setoption newgame\n")) } else // optional in UCCI\r
            EPRINT((f, "# u%cinewgame\n", sc)) fflush(toE);\r
        }\r
        else if(!strcmp(command, "option")) {\r