FourthTry.ScoreBoard.CreateFrame C# (CSharp) Method

CreateFrame() private method

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