The last move of each game would never be added to the book,
due to use of < instead of <= when testing for the game end.
}
if(appData.debugMode) fprintf(debugFP, "add game to book (%d-%d)\n", backwardMostMove, forwardMostMove);
- for(i=backwardMostMove; i<forwardMostMove && i < 2*appData.bookDepth; i++)
+ for(i=backwardMostMove; i<=forwardMostMove && i < 2*appData.bookDepth; i++)
AddToBook(i, WhiteOnMove(i) ? result : 2-result); // flip result when black moves
}