예제 #1
0
        public virtual IScoreParser GetScoreParser(string scoreParserType, IDiceHolder diceHolder)
        {
            if (scoreParserType.Equals("FunScoreParser", StringComparison.InvariantCultureIgnoreCase))
            {
                return(new FunScoreParser(diceHolder));
            }

            if (scoreParserType.Equals("BoringScoreParser", StringComparison.InvariantCultureIgnoreCase))
            {
                return(new BoringScoreParser(diceHolder));
            }
            return(null);
        }
예제 #2
0
 public BoringScoreParser(IDiceHolder diceHolder)
 {
     _diceHolder   = diceHolder;
     _currentScore = 0;
 }
예제 #3
0
 public GamePresenter(IDiceHolder diceHolder, GameHelper gameHelper, ScoreParserFactory scoreParserFactory)
 {
     _diceHolder         = diceHolder;
     GameHelper          = gameHelper;
     _scoreParserFactory = scoreParserFactory;
 }
예제 #4
0
 public FunScoreParser(IDiceHolder diceHolder)
 {
     _diceHolder   = diceHolder;
     _currentScore = 0;
 }