Remove superfluous copying of machine move
authorH.G. Muller <h.g.muller@hccnet.nl>
Sun, 16 Jan 2011 20:56:14 +0000 (21:56 +0100)
committerArun Persaud <arun@nubati.net>
Sat, 29 Jan 2011 02:15:59 +0000 (18:15 -0800)
There was explicit code in HandleMachineMove() and FinishMove() to put
the move in the moveList, while MakeMove() already does this later in a
more reliable way by calling CoordsToComputerAlgebraic(). This
superfluous code is removed now.

backend.c

index 938e27f..89089f1 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -7330,11 +7330,6 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h
        if (cps->sendTime == 2) cps->sendTime = 1;
        if (cps->offeredDraw) cps->offeredDraw--;
 
-       /* currentMoveString is set as a side-effect of ParseOneMove */
-       safeStrCpy(machineMove, currentMoveString, sizeof(machineMove)/sizeof(machineMove[0]));
-       strcat(machineMove, "\n");
-       safeStrCpy(moveList[forwardMostMove], machineMove, sizeof(moveList[forwardMostMove])/sizeof(moveList[forwardMostMove][0]));
-
         /* [AS] Save move info*/
         pvInfoList[ forwardMostMove ].score = programStats.score;
         pvInfoList[ forwardMostMove ].depth = programStats.depth;
@@ -9930,8 +9925,6 @@ LoadGameOneMove(readAhead)
        return FALSE;
     } else {
        /* currentMoveString is set as a side-effect of yylex */
-       strcat(currentMoveString, "\n");
-       safeStrCpy(moveList[forwardMostMove], currentMoveString, sizeof(moveList[forwardMostMove])/sizeof(moveList[forwardMostMove][0]));
 
        thinkOutput[0] = NULLCHAR;
        MakeMove(fromX, fromY, toX, toY, promoChar);