int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, inex, on[500];\r
char currMove[20], moveMap[500][10], /* for analyze mode */ canPonder[20], threadOpt[20];\r
char board[100]; // XQ board for UCCI\r
-char *nameWord = "name ", *valueWord = "value ", *wTime = "w", *bTime = "b", *wInc = "winc", *bInc = "binc"; // keywords that differ in UCCI\r
int unit = 1;\r
\r
FILE *toE, *fromE, *fromF;\r
void\r
StartSearch(char *ponder)\r
{ // send the 'go' command to engine. Suffix by ponder.\r
- int x = (ponder[0] != 0);\r
- int nr = moveNr + x; // we ponder for one move ahead!\r
- fprintf(toE, "\ngo%s btime %d wtime %d", ponder, stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime);\r
- DPRINT( "\n# go%s btime %d wtime %d", ponder, stm == BLACK ^ x ^ sc=='s' ? myTime : hisTime, stm == WHITE ^ x ^ sc=='s' ? myTime : hisTime);\r
+ int x = (ponder[0] != 0); // during ponder stm is the opponent\r
+ int black = (stm == BLACK ^ x ^ sc == 's'); // set if our color is what the engine calls black\r
+ int nr = moveNr + x; // we ponder for one move ahead!\r
+ fprintf(toE, "\ngo%s btime %d wtime %d", ponder, black ? myTime : hisTime, !black ? myTime : hisTime);\r
+ DPRINT( "\n# go%s btime %d wtime %d", ponder, black ? myTime : hisTime, !black ? myTime : hisTime);\r
if(sTime > 0) { fprintf(toE, " movetime %d", sTime); DPRINT(" movetime %d", sTime); } else\r
if(mps) { fprintf(toE, " movestogo %d", mps*(nr/(2*mps)+1)-nr/2); DPRINT(" movestogo %d", mps*(nr/(2*mps)+1)-nr/2); }\r
if(inc && !suffix) { fprintf(toE, " winc %d binc %d", inc, inc); DPRINT(" winc %d binc %d", inc, inc); }\r