From df11bbcfb7320a53b2dd653e29509bfaa3eb4d09 Mon Sep 17 00:00:00 2001 From: "H.G. Muller" Date: Tue, 4 Mar 2014 16:25:34 +0100 Subject: [PATCH] Make some non-standard commands engine-defined options The commands 'tsume', 'contempt' and 'hashdepth' are made into XBoard engine-defined options (the latter into two), so they can be set interactively through the Engine Settings dialog of the GUI. --- gnushogi/commondsp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 4718fd9..26950b6 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1648,6 +1648,10 @@ InputCommand(char *command) } 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", @@ -1887,6 +1891,14 @@ InputCommand(char *command) { 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; -- 2.11.4.GIT