BowlingSecondPractice.ScoreBoard.CreateFrame C# (CSharp) Method

CreateFrame() private static method

private static CreateFrame ( int firstBall, int secondBall, int thirdBall ) : Frame
firstBall int
secondBall int
thirdBall int
return Frame
        private static Frame CreateFrame(int firstBall, int secondBall, int thirdBall)
        {
            Frame frame = null;
            if (thirdBall != -1)
            {
                frame = new LastFrame(firstBall, secondBall, thirdBall);
            }
            else
            {
                frame = new Frame(firstBall, secondBall);
            }
            return frame;
        }