コード例 #1
0
 public ScrabbleTurnCalculatorLogic(IEnglishDictionary dictionary, IPointCalculatorLogic pointCalculatorLogic, IGameBoardLogic gameBoardLogic, ILetterRackLogic letterRackLogic)
 {
     this.dictionary           = dictionary;
     this.pointCalculatorLogic = pointCalculatorLogic;
     this.gameBoardLogic       = gameBoardLogic;
     this.letterRackLogic      = letterRackLogic;
 }
コード例 #2
0
        public ITurnCalculatorLogic GetTurnCalculator()
        {
            IDictionaryBuilder    dictionaryBuilder = GetDictionaryBuilder();
            IEnglishDictionary    dictionary        = dictionaryBuilder.BuildDictionary();
            IPointCalculatorLogic pointCalculator   = GetPointCalculator();
            ILetterRackLogic      rackLogic         = GetLetterRackLogic();
            IGameBoardLogic       boardLogic        = GetGameBoardLogic();

            return(new ScrabbleTurnCalculatorLogic(dictionary, pointCalculator, boardLogic, rackLogic));
        }
コード例 #3
0
 // Make it properly with dependency injection.
 public GreetingService(IEnglishDictionary dictionary)
 => _dictionary = dictionary;
コード例 #4
0
 public WordsProcessorService(IEnglishDictionary englishDictionary)
 {
     this.englishWords = englishDictionary.GetEnglishDictionary();
 }