From: Niklas Fiekas Date: Wed, 24 Jun 2020 21:03:00 +0000 (+0200) Subject: Simplify use_time_management() and allow composing X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=a84e3ac287fa2c2db5ee58faabdb31943acc78d0 Simplify use_time_management() and allow composing like other `go` commands wtime/btime can now be composed. `go depth 10 wtime 100` will let the engine use standard time management but stop if depth 10 is reached. fixes https://github.com/official-stockfish/Stockfish/issues/2767 closes https://github.com/official-stockfish/Stockfish/pull/2768 No functional change --- diff --git a/src/search.h b/src/search.h index 1653ce92..3e855c8b 100644 --- a/src/search.h +++ b/src/search.h @@ -91,7 +91,7 @@ struct LimitsType { } bool use_time_management() const { - return !(mate | movetime | depth | nodes | perft | infinite); + return time[WHITE] || time[BLACK]; } std::vector searchmoves;