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); }
public BoringScoreParser(IDiceHolder diceHolder) { _diceHolder = diceHolder; _currentScore = 0; }
public GamePresenter(IDiceHolder diceHolder, GameHelper gameHelper, ScoreParserFactory scoreParserFactory) { _diceHolder = diceHolder; GameHelper = gameHelper; _scoreParserFactory = scoreParserFactory; }
public FunScoreParser(IDiceHolder diceHolder) { _diceHolder = diceHolder; _currentScore = 0; }