private void worker_DoWork(object sender, DoWorkEventArgs e) { ChessSolver solver = new ChessSolver(this.debutsGraph); e.Result = solver.SolveProblem( this.gameProvider, this.chessboardControl.CurrentPlayerColor, this.maxdepth); }
public void Run(int maxdepth) { Stopwatch watch = new Stopwatch(); watch.Start(); Color color = this.lastColor; // TODO write some exceptions handling solver.SolveProblem(this.provider, color, maxdepth); watch.Stop(); this.milliseconds = watch.ElapsedMilliseconds; this.nodesSearched = solver.NodesSearched; this.depth = maxdepth; }