mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Handle UCI command "mate in x moves"
Following a user request I added the handling of UCI: go mate x Currently we just return from a PV node if x moves have been done. Probably not the best approach. I have looked at Fruit/Toga sources and there is even simpler: engine falls back on a fixed depth search. No functional change.
This commit is contained in:
@@ -80,9 +80,9 @@ struct RootMove {
|
||||
struct LimitsType {
|
||||
|
||||
LimitsType() { memset(this, 0, sizeof(LimitsType)); }
|
||||
bool use_time_management() const { return !(movetime | depth | nodes | infinite); }
|
||||
bool use_time_management() const { return !(mate | movetime | depth | nodes | infinite); }
|
||||
|
||||
int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, infinite, ponder;
|
||||
int time[COLOR_NB], inc[COLOR_NB], movestogo, depth, nodes, movetime, mate, infinite, ponder;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user