From: H.G.Muller Date: Tue, 4 Mar 2014 15:25:34 +0000 (+0100) Subject: Make some non-standard commands engine-defined options X-Git-Url: http://winboard.nl/cgi-bin?p=gnushogi.git;a=commitdiff_plain;h=a0c1400035104ea33d6eda049dbdb5fe2150de9a 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. --- diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 9fb2492..a03d69d 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -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;