public void ManualEngineDiscover(string workingDirectory, string executable, List <string> arguments) { EngineConfiguration configuration = new EngineConfiguration("Manual", executable, "xboard"); configuration.WorkingDirectory = workingDirectory; currentConfiguration = configuration; if (arguments != null) { foreach (string arg in arguments) { configuration.AddArgument(arg); } } DebugMessageLog log = new DebugMessageLog(); EngineBuilder builder = new EngineBuilder(log, configuration); TimerFactory timerFactory = new TimerFactory(); XBoardEngine engine = (XBoardEngine)builder.Create(timerFactory, playerReady); }
protected void discoverExecutable(string engineDir, string executable) { string folderName = engineDir.Substring(engineDir.LastIndexOf(Path.DirectorySeparatorChar) + 1); // fire it up to see what variants/features it supports EngineConfiguration configuration = new EngineConfiguration(folderName, executable, "xboard"); configuration.WorkingDirectory = engineDir; // if this directory contains a file named 'variants.txt' we will // automatically pass that in as a command line argument (Sjaak II) if (File.Exists(engineDir + @"\variants.txt")) { configuration.AddArgument("variants.txt"); } currentConfiguration = configuration; DebugMessageLog log = new DebugMessageLog(); EngineBuilder builder = new EngineBuilder(log, configuration); TimerFactory timerFactory = new TimerFactory(); XBoardEngine engine = (XBoardEngine)builder.Create(timerFactory, playerReady); }