if(sscanf(inBuf+7, "Contempt=%d", &contemptFactor) == 1) continue;\r
continue;\r
}\r
- if(!strcmp(command, "variant")) {\r
- for(i=0; i<7; i++) {\r
- sscanf(inBuf+8, "%s", command);\r
- if(!strcmp(variants[i].name, command)) {\r
- Init(curVarNr = i); stm = Setup2(NULL); break;\r
- }\r
- }\r
- continue;\r
- }\r
if(!strcmp(command, "sd")) { sscanf(inBuf, "sd %d", &maxDepth); continue; }\r
if(!strcmp(command, "st")) { sscanf(inBuf, "st %d", &timePerMove); continue; }\r
if(!strcmp(command, "memory")) { SetMemorySize(atoi(inBuf+7)); continue; }\r
if(!strcmp(command, "ping")) { printf("pong%s", inBuf+4); continue; }\r
// if(!strcmp(command, "")) { sscanf(inBuf, " %d", &); continue; }\r
- if(!strcmp(command, "new")) {\r
- engineSide = BLACK; Init(V_CHESS); stm = Setup2(NULL); maxDepth = MAXPLY; randomize = OFF; curVarNr = comp = 0;\r
- continue;\r
- }\r
- if(!strcmp(command, "setboard")){ engineSide = NONE; Init(curVarNr); stm = Setup2(inBuf+9); continue; }\r
if(!strcmp(command, "easy")) { ponder = OFF; continue; }\r
if(!strcmp(command, "hard")) { ponder = ON; continue; }\r
- if(!strcmp(command, "undo")) { stm = TakeBack(1); continue; }\r
- if(!strcmp(command, "remove")) { stm = TakeBack(2); continue; }\r
if(!strcmp(command, "go")) { engineSide = stm; continue; }\r
if(!strcmp(command, "post")) { postThinking = ON; continue; }\r
if(!strcmp(command, "nopost")) { postThinking = OFF;continue; }\r
if(!strcmp(command, "accepted")){ continue; }\r
if(!strcmp(command, "rejected")){ continue; }\r
if(!strcmp(command, "result")) { continue; }\r
- if(!strcmp(command, "hover")) { continue; }\r
+ if(!strcmp(command, "hover")) { continue; }\r
if(!strcmp(command, "")) { continue; }\r
if(!strcmp(command, "usermove")){\r
int move = ParseMove(inBuf+9);\r
}\r
continue;\r
}\r
+ if(!strcmp(command, "new")) {\r
+ engineSide = BLACK; Init(V_CHESS); stm = Setup2(NULL); maxDepth = MAXPLY; randomize = OFF; curVarNr = comp = 0;\r
+ continue;\r
+ }\r
+ if(!strcmp(command, "variant")) {\r
+ for(i=0; i<7; i++) {\r
+ sscanf(inBuf+8, "%s", command);\r
+ if(!strcmp(variants[i].name, command)) {\r
+ Init(curVarNr = i); stm = Setup2(NULL); break;\r
+ }\r
+ }\r
+ continue;\r
+ }\r
+ if(!strcmp(command, "setboard")){ engineSide = NONE; Init(curVarNr); stm = Setup2(inBuf+9); continue; }\r
+ if(!strcmp(command, "undo")) { stm = TakeBack(1); continue; }\r
+ if(!strcmp(command, "remove")) { stm = TakeBack(2); continue; }\r
printf("Error: unknown command\n");\r
}\r
}\r