public override void Execute() { if (!executed) { SelectedTile.DetachPiece(); TargetTile.AttachPiece(Piece, true); executed = true; } }
public override void Execute() { if (!executed) { SelectedTile.DetachPiece(); TargetTile.AttachPiece(Piece, true); if (Piece is IEnPassantable) { IEnPassantable enPassantablePiece = Piece as IEnPassantable; enPassantablePiece.CurrentlyEnPassantable = true; } executed = true; } }