Ejemplo n.º 1
0
    public static Action NextAction(List <int> pinFalls)
    {
        ActionMasterOldCopy am = new ActionMasterOldCopy();
        Action currentAction   = new Action();

        foreach (int pinFall in pinFalls)
        {
            currentAction = am.Bowl(pinFall);
        }
        return(currentAction);
    }
Ejemplo n.º 2
0
    public void Bowl(int pinFalls)
    {
        try{
            rolls.Add(pinFalls);
            ball.Reset();
            pinSetter.PerformAction(ActionMasterOldCopy.NextAction(rolls));
        } catch {
            Debug.LogWarning("Something went wrong in BOWL()");
        }

        try{
            scoreDisplay.FillRollCard(rolls);
            scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
        } catch {
            Debug.LogWarning("Something went wrong in ScoreDisplay.FillRollCard");
        }
    }