}\r
else if(!strcmp(command, "info")) {\r
int d=0, s=0, t=(GetTickCount() - startTime)/10, n=1;\r
- char *pv;\r
+ char *pv, varName[80];\r
if(sscanf(line+5, "string times @ %c", &dummy) == 1) { printf("# %s", line+12); continue; }\r
+ if(sscanf(line+5, "string variant %s", varName) == 1) {\r
+ if(strcmp(varName,"chess") && (p = strstr(line+18, " startpos "))) printf("setup (-) 8x8+0_fairy %s", p+10);\r
+ continue;\r
+ }\r
if(collect && (pv = strstr(line+5, "currmove "))) {\r
if(p = strstr(line+5, "currmovenumber ")) {\r
n = atoi(p+15);\r
iniPos[strlen(iniPos)-1] = sm = 0; collect = (computer == ANALYZE);\r
}\r
else if(!strcmp(command, "variant")) {\r
- if(varOpt) fprintf(toE, "setoption name UCI_Variant value %sucinewgame\n", strcmp(line+8, "3check\n") ? line+8 : "threecheck\n");\r
+ if(varOpt) {\r
+ fprintf(toE, "setoption name UCI_Variant value %sucinewgame\nisready\n", strcmp(line+8, "3check\n") ? line+8 : "threecheck\n");\r
+ fflush(toE); Sync(PAUSE);\r
+ }\r
if(!strcmp(line+8, "shogi\n")) size = 9, strcpy(iniPos, "position startpos");\r
if(!strcmp(line+8, "5x5+5_shogi\n")) size = 5, strcpy(iniPos, "position startpos");\r
if(!strcmp(line+8, "xiangqi\n")) strcpy(iniPos, "fen rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR r");\r