]> git.sesse.net Git - stockfish/blobdiff - src/ucioption.cpp
Simplify set_option()
[stockfish] / src / ucioption.cpp
index de4e07fb38a6f37189e5793e899a17f93998a5c6..cd59c9310042a425a4fd2b9525b132e24947e9d4 100644 (file)
@@ -101,7 +101,7 @@ void init_uci_options() {
   Options["OwnBook"] = Option(true);
   Options["MultiPV"] = Option(1, 1, 500);
   Options["Emergency Move Horizon"] = Option(40, 0, 50);
-  Options["Emergency Base Time"] = Option(200, 0, 60000);
+  Options["Emergency Base Time"] = Option(200, 0, 30000);
   Options["Emergency Move Time"] = Option(70, 0, 5000);
   Options["Minimum Thinking Time"] = Option(20, 0, 5000);
   Options["UCI_Chess960"] = Option(false);
@@ -163,8 +163,11 @@ void Option::set_value(const string& value) {
 
   assert(!type.empty());
 
-  if (    (type == "check" || type == "button")
-      && !(value == "true" || value == "false"))
+  if (value.empty())
+      return;
+
+  if (   (type == "check" || type == "button")
+      != (value == "true" || value == "false"))
       return;
 
   if (type == "spin")