Esempio n. 1
0
        protected override string FindWord(int userId, string pattern)
        {
            var UsedWords = GetUsedWords(userId);
            var word      = "не нашлось";
            var words     = WordDAO.FindWordsStartWith(pattern, Category.Name).GetEnumerator();

            while (words.MoveNext())
            {
                if (!UsedWords.Contains(words.Current))
                {
                    word = words.Current;
                    break;
                }
            }
            return(word);
        }
Esempio n. 2
0
 protected override string FindWord(int userId, string pattern)
 {
     return(WordDAO.FindRandomWord(Category, minNumChar));
 }
Esempio n. 3
0
        private bool IsWordRight(int userId, string text)
        {
            var LastUsedChar = GetLastUsedChar(userId);

            return(LastUsedChar == text.ToLower()[0] && WordDAO.IsCorrectWord(text, Category.Name));
        }