/// <summary>
    /// Handles the bowling of a ball
    /// </summary>
    /// <param name="pinFall">The number of fallen pins</param>
    public void Bowl(int pinFall)
    {
        try
        {
            rolls.Add(pinFall);
            ball.Reset();

            pinSetter.PerformAction(ActionMaster.NextAction(rolls));
        }
        catch
        {
            Debug.LogWarning("Something went wrong in Bowl");
        }

        try
        {
            scoreDisplay.FillRolls(rolls);
            scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
        }
        catch
        {
            Debug.LogWarning("FillRollCard errored");
        }
    }
Example #2
0
 private void ReportActionToPinSetter(ActionMaster.Action actionToPerform)
 {
     pinSetter.PerformAction(actionToPerform);
 }