Пример #1
0
        public IFrameScorer GetScorer(IFrame frameToScore)
        {
            IFrameScorer frameScorer;

            if (frameToScore.IsStrike())
            {
                frameScorer = new StrikeFrameScorer();
            }
            else if (frameToScore.IsSpare())
            {
                frameScorer = new SpareFrameScorer();
            }
            else
            {
                frameScorer = new NormalFrameScorer();
            }

            return(frameScorer);
        }
Пример #2
0
        public IFrameScorer GetScorer(IFrame frameToScore)
        {
            IFrameScorer frameScorer;

            if(frameToScore.IsStrike())
            {
                frameScorer = new StrikeFrameScorer();
            }
            else if(frameToScore.IsSpare())
            {
                frameScorer = new SpareFrameScorer();
            }
            else
            {
                frameScorer = new NormalFrameScorer();
            }

            return frameScorer;
        }