Exemplo n.º 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);
        }
Exemplo n.º 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;
        }