postThinking--; repCnt = 0; tlim1 = tlim2 = 1e8; msp = 0;\r
Search(-INF-1, INF+1, 0, 1, sup1 & ~PROMOTE, sup2);\r
postThinking++;\r
- listStart = retFirst; listEnd = retMSP;\r
+ listStart = retFirst; listEnd = msp = retMSP;\r
}\r
\r
MOVE\r
ret = f<<SQLEN | t2;\r
if(*moveText != '\n' && *moveText != '=') ret |= PROMOTE;\r
printf("# suppress = %c%d\n", sup1%BW+'a', sup1/BW);\r
- ListMoves();\r
+// ListMoves();\r
for(i=listStart; i<listEnd; i++) {\r
if(moveStack[i] == INVALID) continue;\r
if(c == '@' && (moveStack[i] & SQUARE) == (moveStack[i] >> SQLEN & SQUARE)) break; // any null move matches @@@@\r
char b[BSIZE], buf[2000], *q;\r
for(i=0; i<bsize; i++) b[i] = 0;\r
ReadSquare(coords, &sqr);\r
- ListMoves();\r
+// ListMoves();\r
for(i=listStart; i<listEnd; i++) {\r
if(sqr == (moveStack[i]>>SQLEN & SQUARE)) {\r
int t = moveStack[i] & SQUARE;\r
\r
fflush(stdout); // make sure everything is printed before we do something that might take time\r
\r
+ if(listEnd == 0) ListMoves(); // always maintain a list of legal moves in root position\r
+\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
stm = MakeMove2(stm, move); // assumes MakeMove returns new side to move\r
gameMove[moveNr++] = move; // remember game\r
printf("move %s\n", MoveToText(move, 1));\r
+ listEnd = 0;\r
}\r
}\r
\r
if(comp) PrintResult(stm, -INF); // against computer: claim\r
} else {\r
stm = MakeMove2(stm, move);\r
- ponderMove = INVALID;\r
+ ponderMove = INVALID; listEnd = 0;\r
gameMove[moveNr++] = move; // remember game\r
}\r
continue;\r
}\r
+ listEnd = 0;\r
if(!strcmp(command, "new")) {\r
engineSide = BLACK; Init(V_CHESS); stm = Setup2(NULL); maxDepth = MAXPLY; randomize = OFF; curVarNr = comp = 0;\r
continue;\r