- if ( bookMove != MOVE_NONE
- && count(RootMoves.begin(), RootMoves.end(), bookMove))
- {
- std::swap(RootMoves[0], *find(RootMoves.begin(), RootMoves.end(), bookMove));
- goto finish;
- }
+ if ( Options["OwnBook"]
+ && (bm = book.probe(pos, Options["Book File"], Options["Best Book Move"])) != MOVE_NONE
+ && count(RootMoves.begin(), RootMoves.end(), bm))
+ {
+ std::swap(RootMoves[0], *find(RootMoves.begin(), RootMoves.end(), bm));
+ goto finalize;