X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fucioption.cpp;h=2db1beeba31a11305fe7a4cb15ed09e6c62f8a99;hb=fb50e16cdda68e05d08ed3992a04e5a396a461e3;hp=6fdc6e77a1b22f2eccc9128d61a597ede0f23bde;hpb=d3260ce70f6a17f9d43d199f0e07488888188f8b;p=stockfish diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 6fdc6e77..2db1beeb 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -127,7 +127,11 @@ namespace { o["Ponder"] = Option(true); o["OwnBook"] = Option(true); o["MultiPV"] = Option(1, 1, 500); - o["UCI_Chess960"] = Option(false); + o["Emergency Move Horizon"] = Option(40, 0, 50); + o["Emergency Base Time"] = Option(200, 0, 60000); + o["Emergency Move Time"] = Option(70, 0, 5000); + o["Minimum Thinking Time"] = Option(20, 0, 5000); + o["UCI_Chess960"] = Option(false); // Just a dummy but needed by GUIs o["UCI_AnalyseMode"] = Option(false); // Any option should know its name so to be easily printed @@ -282,7 +286,7 @@ void set_option_value(const string& name, const string& value) { if (opt.type == CHECK && v != "0" && v != "1") return; - else if (opt.type == SPIN) + if (opt.type == SPIN) { int val = atoi(v.c_str()); if (val < opt.minValue || val > opt.maxValue) @@ -290,26 +294,3 @@ void set_option_value(const string& name, const string& value) { } opt.currentValue = v; } - - -/// push_button() is used to tell the engine that a UCI parameter of type -/// "button" has been selected: - -void push_button(const string& buttonName) { - - set_option_value(buttonName, "true"); -} - - -/// button_was_pressed() tests whether a UCI parameter of type "button" has -/// been selected since the last time the function was called, in this case -/// it also resets the button. - -bool button_was_pressed(const string& buttonName) { - - if (!get_option_value(buttonName)) - return false; - - set_option_value(buttonName, "false"); - return true; -}