X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fucioption.cpp;h=346fd42b89a5aa8a5ea988618e8640ce92b43e82;hb=47f5560e2dccfad9aa64afc7a002ce049b7504d3;hp=e6ce532aed924119af95234942adebe36a383e41;hpb=f57d51b7f3b5d97b7322aa7e4bd9025726a518e3;p=stockfish
diff --git a/src/ucioption.cpp b/src/ucioption.cpp
index e6ce532a..346fd42b 100644
--- a/src/ucioption.cpp
+++ b/src/ucioption.cpp
@@ -17,6 +17,7 @@
along with this program. If not, see .
*/
+#include
#include
#include
@@ -28,7 +29,25 @@ using std::string;
using std::cout;
using std::endl;
-OptionsMap Options;
+OptionsMap Options; // Global object
+
+
+// Our case insensitive less() function as required by UCI protocol
+bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const {
+
+ int c1, c2;
+ size_t i = 0;
+
+ while (i < s1.size() && i < s2.size())
+ {
+ c1 = tolower(s1[i]);
+ c2 = tolower(s2[i++]);
+
+ if (c1 != c2)
+ return c1 < c2;
+ }
+ return s1.size() < s2.size();
+}
// stringify() converts a numeric value of type T to a std::string
@@ -75,10 +94,9 @@ void init_uci_options() {
Options["Minimum Split Depth"] = Option(4, 4, 7);
Options["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
Options["Threads"] = Option(1, 1, MAX_THREADS);
- Options["Use Sleeping Master"] = Option(false);
+ Options["Use Sleeping Threads"] = Option(false);
Options["Hash"] = Option(32, 4, 8192);
Options["Clear Hash"] = Option(false, "button");
- Options["New Game"] = Option(false, "button");
Options["Ponder"] = Option(true);
Options["OwnBook"] = Option(true);
Options["MultiPV"] = Option(1, 1, 500);