Make some non-standard commands engine-defined options
[gnushogi.git] / gnushogi / commondsp.c
index 9fb2492..a03d69d 100644 (file)
@@ -1778,6 +1778,10 @@ InputCommand(char *command, int root)
         }
         else if (strcmp(s, "protover") == 0)
         {
+            printf("feature option=\"tsume -check 0\"\n");
+            printf("feature option=\"contempt -spin %d -1000 1000\"\n", contempt);
+            printf("feature option=\"Hash-file search depth -spin %d 0 100\"\n", HashDepth);
+            printf("feature option=\"Hash-file move number -spin %d 0 100\"\n", HashMoveLimit);
             printf("feature myname=\"GNU %s %s\" ",
 #ifdef MINISHOGI
                    "MiniShogi",
@@ -2051,6 +2055,14 @@ InputCommand(char *command, int root)
         {
             flag.easy = !flag.easy;
         }
+        else if (strcmp(s, "option") == 0)
+        {
+            sscanf(sx, "option tsume=%hd", &flag.tsume) ||
+            sscanf(sx, "option hash=%hd",  &flag.hash)  ||
+            sscanf(sx, "option Hash-file search depth=%hd", &HashDepth)    ||
+            sscanf(sx, "option Hash-file move number=%hd", &HashMoveLimit) ||
+            sscanf(sx, "option contempt=%hd", &contempt);
+        }
         else if (strcmp(s, "tsume") == 0)
         {
             flag.tsume = !flag.tsume;