EPRINT((f, "# ponderhit%s\n", draw)) fflush(toE); fflush(stdout);\r
} else {\r
if(searching) StopSearch(1); // ponder miss or analysis, as moves won't arrive during thinking\r
- strcpy(move[moveNr++], command); // possibly overwrites ponder move\r
- *qEnd++ = '\n'; Sync(WAKEUP); // queue command to toggle stm\r
+ p = line+7; while(qEnd < queue+10000 && (*qEnd++ = *p++) != '\n') {}\r
+ Sync(WAKEUP); // queue move for adding it to game (and toggle stm)\r
}\r
} else\r
if(!strcmp(command, "resume")) {\r
int i;\r
\r
p=line; while(qStart < qEnd && (*p++ = *qStart++) != '\n') {} *p = 0;\r
- if(line[0] == '\n') { stm = WHITE+BLACK - stm; return; }\r
- sscanf(line, "%s", command); DPRINT("# command %s\n", command), fflush(stdout);\r
+ sscanf(line, "%s %s", command, type); DPRINT("# command %s\n", command), fflush(stdout);\r
\r
if(!strcmp(command, "new")) {\r
computer = BLACK; moveNr = 0; depth = -1; move[0][0] = 0;\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, "e")) { strcpy(move[moveNr++], type); stm ^= WHITE|BLACK; return; }\r
else if(!strcmp(command, "option")) {\r
char *p;\r
if(p = strchr(line, '=')) {\r