public void TryCandidateWordTest()
        {
            var constraints = new Constraints("dog", "o");

            Word w;
            var match = constraints.TryCandidateWord("DOG", out w);
            Assert.IsFalse(match);
            Assert.IsNull(w);
        }
示例#2
0
        public IEnumerable<Word> GetWords(Constraints constraints)
        {
            if (constraints == null)
                yield break;

            if (!m_isLoaded)
            {
                LoadDictionary();
            }

            if (m_words == null)
                yield break;

            foreach (var candidate in m_words)
            {
                Word solvedWord;
                if (constraints.TryCandidateWord(candidate, out solvedWord))
                    yield return solvedWord;
            }
        }