public void WicketBallBowled(Batsman batsman)
 {
     var ball = new Ball();
     ball.Runs = 0;
     ball.IsPenaltyBall = false;
     WicketBall += ball.OnWicketBall;
     DeliverBall(ball);
     OnWicketBall(batsman);
 }
        public void DeliverBall(int runs, bool isFail)
        {
            if (isFail)
            {
                PenaltyBallDeliverBall(runs);
            }
            else
            {
                var ball = new Ball();
                ball.Runs = runs;
                OnBallBowled(runs);
                OverBalls.Add(ball);
            }

            IsOverComplete();
        }
 private string IsPenaltyBall(Ball ball)
 {
     if (ball.IsPenaltyBall)
     {
         return "p";
     }
     else
     {
         return "";
     }
 }
 private void PenaltyBallDeliverBall(int runs)
 {
     var ball = new Ball();
     ball.Runs = runs;
     ball.IsPenaltyBall = true;
     if (hasPenaltyBall)
     {
         runs += 3;
     }
     else
     {
         runs += 1;
     }
     hasPenaltyBall = true;
     OnBallBowled(runs);
     OverBalls.Add(ball);
 }
 private void DeliverBall(Ball ball)
 {
     OnBallBowled(ball.Runs);
     OverBalls.Add(ball);
 }