ChessDemo.MainWindow.chessboardControl_MoveFinished C# (CSharp) Method

chessboardControl_MoveFinished() private method

private chessboardControl_MoveFinished ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void chessboardControl_MoveFinished(object sender, EventArgs e)
        {
            var lastMove = this.gameProvider.History.GetLastMove();
            bool needPawnPromotion = (int)lastMove.Type >= (int)MoveType.Promotion;
            this.canSolverStart = true;

            this.chessboardControl.AnimateLast();

            if (needPawnPromotion)
            {
                this.chessboardControl.UserPromotePawn();
                this.canSolverStart = false;
            }

            this.chessboardControl.ChangeCurrentPlayer();
            this.UpdateRedoStatus();
        }