dje-dev / Ceres

Ceres - an MCTS chess engine for research and recreation
GNU General Public License v3.0
153 stars 23 forks source link

setoption #37

Closed rooklift closed 3 years ago

rooklift commented 3 years ago

About this: https://github.com/dje-dev/Ceres/blob/5c2e541f90a3464d2e5f95c3cf15a10bff7f1a98/src/Ceres.Features/UCI/UCIManager.SetOption.cs#L123

Both names and values can have spaces I'm afraid, so you need to find the (first) instance of name and the first instance of value and then take whatever string is between them as the name, and whatever string is after value as the value.

(Deleting leading and trailing whitespace from them, ofc.)

And I suppose one needs to worry about names that actually contain the string "value" and so need to check there's whitespace on both sides of value, yeah UCI has some questionable parts....

rooklift commented 3 years ago

I believe this is working now.