Пример #1
0
        public virtual void Execute()
        {
            //Promotion
            if (CanPieceBePromoted())
            {
                OnInitiatePawnPromotion?.Invoke(start, new EventArgs());
            }

            var lostPiece = board.ShiftPiece(start, end);

            start.IsFirstMove = false;
            if (lostPiece != null)
            {
                OnPieceCaptured?.Invoke(lostPiece, new EventArgs());
            }
        }
Пример #2
0
 private void Move_OnInitiatePawnPromotion(object sender, EventArgs e)
 {
     OnInitiatePawnPromotion?.Invoke(sender, e);
 }