public TrieWordValidator(IEnumerable <string> wordsArray, ITrieFactory trieFactory) { var wordsList = new List <string>(wordsArray); var trie = trieFactory.Create(); wordsList.ForEach(x => trie.Insert(x)); _validWords = trie; }
public Level(string chosenLevel, IPlayer player, IWordOperator wordOperator, ITrieFactory trieFactory, IWriter writer, IReader reader) { this.player = player; this.writer = writer; this.reader = reader; this.chosenLevel = chosenLevel; this.wordOperator = wordOperator; trieFromDictionary = trieFactory.CreateTrieFromDictionary(); }
public DefaultGameFactory(IGameRepository gameRepository, ITrieFactory trieFactory, IDomainEventDispatcher domainEventDispatcher) { _domainEventDispatcher = domainEventDispatcher; _gameRepository = gameRepository; _trieFactory = trieFactory; }