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()); } }
private void Move_OnInitiatePawnPromotion(object sender, EventArgs e) { OnInitiatePawnPromotion?.Invoke(sender, e); }