diff options
Diffstat (limited to 'src/uci.cpp')
| -rw-r--r-- | src/uci.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index 23e8419..812a0cd 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -13,8 +13,8 @@ #include "board/board.hpp" #include "board/fen.hpp" -#include "bot.hpp" #include "book.hpp" +#include "bot.hpp" #include "misc.hpp" #include "moves.hpp" #include "uci.hpp" @@ -224,24 +224,13 @@ static void GoCommand(Game *game, std::string &cmd) { exit(1); } - // Try opening book first - uint16_t bookMove = 0; - if (game->MoveClock < GetBookDepth()) { - bookMove = ProbeBook(GenerateZobristKey(game)); - } - - uint16_t best; - if (bookMove != 0) { - best = bookMove; - } else { - move_options options = { - .wtime = wtime, - .btime = btime, - .wncr = wncr, - .bncr = bncr, - }; - best = GetBestMove(game, depth, options); - } + move_options options = { + .wtime = wtime, + .btime = btime, + .wncr = wncr, + .bncr = bncr, + }; + uint16_t best = GetBestMove(game, depth, options); Piece piece = game->pieces[getFromValueFromMove(best)]; |
