public ScrabbleTurnCalculatorLogic(IEnglishDictionary dictionary, IPointCalculatorLogic pointCalculatorLogic, IGameBoardLogic gameBoardLogic, ILetterRackLogic letterRackLogic) { this.dictionary = dictionary; this.pointCalculatorLogic = pointCalculatorLogic; this.gameBoardLogic = gameBoardLogic; this.letterRackLogic = letterRackLogic; }
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)); }
// Make it properly with dependency injection. public GreetingService(IEnglishDictionary dictionary) => _dictionary = dictionary;
public WordsProcessorService(IEnglishDictionary englishDictionary) { this.englishWords = englishDictionary.GetEnglishDictionary(); }