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:
Marco Costalba
2012-12-30 11:40:20 +01:00
parent 3cf6471738
commit ce063f59cd
3 changed files with 15 additions and 3 deletions

View File

@@ -215,6 +215,7 @@ namespace {
else if (token == "depth") is >> limits.depth;
else if (token == "nodes") is >> limits.nodes;
else if (token == "movetime") is >> limits.movetime;
else if (token == "mate") is >> limits.mate;
else if (token == "infinite") limits.infinite = true;
else if (token == "ponder") limits.ponder = true;
}