From a0c1400035104ea33d6eda049dbdb5fe2150de9a 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 files changed, 12 insertions(+), 0 deletions(-) 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; -- 1.7.0.4