예제 #1
0
        public void AddThrow(KnockedDownPin value)
        {
            if (!CanAddPins())
            {
                throw new InvalidOperationException("Frame is already full");
            }

            pins.Add(value);
        }
예제 #2
0
        public void AddThrow(KnockedDownPin value)
        {
            if (!frames[currentFrame].CanAddPins())
            {
                currentFrame += 1;
                frames.Add(new Frame(currentFrame));
            }

            frames[currentFrame].AddThrow(value);
        }