Example #1
0
 public void SetPlayer(CPlayer p)
 {
     player = p;
     book   = FormChess.bookList.GetBook(p.book);
     engine = FormChess.engineList.GetEngine(p.engine);
     bookPro.Terminate();
     enginePro.Terminate();
     if (book == null)
     {
         p.book = CData.none;
     }
     else
     {
         bookPro.SetProgram($@"{AppDomain.CurrentDomain.BaseDirectory}Books\{book.exe}", book.GetParameters(engine));
     }
     if (engine == null)
     {
         p.engine = "Human";
     }
     else
     {
         enginePro.SetProgram($@"{AppDomain.CurrentDomain.BaseDirectory}Engines\{engine.file}", engine.parameters, FormOptions.spamOff);
     }
 }
Example #2
0
 public void EngineTerminate()
 {
     enginePro.Terminate();
 }