\r
if(stm == engineSide) { // if it is the engine's turn to move, set it thinking, and let it move\r
\r
+pboard(board);\r
score = SearchBestMove(stm, timeLeft, mps, timeControl, inc, timePerMove, &move, &ponderMove);\r
\r
if(move == INVALID) { // game apparently ended\r
// wait for input, and read it until we have collected a complete line\r
for(i = 0; (inBuf[i] = getchar()) != '\n'; i++);\r
inBuf[i+1] = 0;\r
-pboard(board);\r
-pmoves(retFirst, retMSP);\r
\r
// extract the first word\r
sscanf(inBuf, "%s", command);\r
for(i=0; i<5; i++) {\r
sscanf(inBuf+8, "%s", command);\r
if(!strcmp(variants[i].name, command)) {\r
-printf("var %d\n",i);\r
Init(i); stm = Setup2(NULL); break;\r
}\r
}\r
if(!strcmp(command, "")) { continue; }\r
if(!strcmp(command, "usermove")){\r
int move = ParseMove(inBuf+9);\r
+pboard(board);\r
if(move == INVALID) {\r
if(reason) printf("Illegal move {%s}\n", reason); else printf("%s\n", reason="Illegal move");\r
if(comp) PrintResult(stm, -INF); // against computer: claim\r