H.G.Muller wrote:I suppose 'value' here is symbolic for 0 or 1.
On receiving that, XBoard would check if its -first/secondOptions (string) option for that engine would contain the text "NOCASTLE=value", and if it does, send this text up to the next comma to the engine as
option NOCASTLE=value
In all cases it will remember the engine has this option, and show it in the Engine Settings dialog as a checkbox, which is ticked according to the current 'value'. If the user alters the tick state there the same command as given above is used to send the new value to the engine.
The correct way to print the value was a little confusing. A clear example would makes things much easier than guessing. This printf seems to produce the correct box:
- Code: Select all
printf("feature option=\"NOCASTLE -check 0\"\n");
If the box is ticked then it sends only to the first engine:
11057 >first : option NOCASTLE=1else it prints in the debug file,
[x] NOCASTLE Neither the GUI or the second engine have any idea what NOCASTLE means. However, option NOCASTLE may be of some use as a way to handicap the first engine, but special code has to be added to interpret the "option" sent. The exercise in very interesting as now I know how custom options work.