Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 public DefaultGameFactory(IGameRepository gameRepository, ITrieFactory trieFactory, IDomainEventDispatcher domainEventDispatcher)
 {
     _domainEventDispatcher = domainEventDispatcher;
     _gameRepository        = gameRepository;
     _trieFactory           = trieFactory;
 }