void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Result == null)
{
if (this.gameProvider.IsStalemate(this.myColor))
MessageBox.Show("You're in stalemate");
else
MessageBox.Show("You're in checkmate");
}
else
{
var move = e.Result as Move;
this.gameProvider.ProcessMove(move, Queem.Core.Color.Black);
this.chessboardControl.AnimateLast();
bool needPawnPromotion = (int)move.Type >= (int)MoveType.Promotion;
if (needPawnPromotion)
this.chessboardControl.PromotePawn(Queem.Core.Color.Black, move.To, move.Type.GetPromotionFigure());
this.chessboardControl.ChangeCurrentPlayer();
}
this.canSolverStart = false;
}