private void AddOption(string line) { var opt = new UciOptionFactory().FromString(line); if (opt != null) { ScratchOptions.Add(opt); CurrentlyAppliedOptions.Add(new UciOptionFactory().FromString(line)); //we want a copy } }
private void UpdateUciOptionsWhileNotSearching() { foreach (var opt in GetChangedOptions()) { SendMessage(opt.GetSetOptionString()); CurrentlyAppliedOptions.First((UciOption o) => o.GetName() == opt.GetName()).SetValue(opt); } if (Profile != null) { Profile.SetOverridedOptions(GetOverridedOptions()); } PvCount = 1; foreach (var opt in CurrentlyAppliedOptions) { if (opt.GetName() == "MultiPV") { PvCount = (int)(long)opt.GetValue(); break; } } }